oxynote/server/core/pkg/mathutil/mathutil.go
2026-08-17 19:14:34 +03:00

16 lines
537 B
Go

// Package mathutil implements helper values and functions for the exact
// decimal arithmetic the domain is expressed in.
package mathutil
import "github.com/shopspring/decimal"
// _hundred is the integer Hundred is built from.
const _hundred = 100
// Hundred is the decimal 100 — the full-percentage reference every ratio in
// the codebase is measured against, so that a full score and a full percent
// are the same value everywhere.
//
//nolint:gochecknoglobals // used as a constant
var Hundred = decimal.NewFromInt(_hundred)