Documentation ¶
Index ¶
- func Max[T Number](a, b T) T
- func Maxf[A Number, B Number](a A, b B) float64
- func Min[T Number](a, b T) T
- func Minf[A Number, B Number](a A, b B) float64
- func NormalFloatDegree[T constraints.Float](v T) int
- func Percent[Minor Number, Major Number](minor Minor, major Major) int
- func Rand(min, max int) int
- func ReduceFrac[T, A constraints.Float](x T, accuracy A, round func(float64) float64) T
- func ReduceFracCeil[T, A constraints.Float](x T, accuracy A) T
- func ReduceFracFloor[T, A constraints.Float](x T, accuracy A) T
- func ReduceFracRound[T, A constraints.Float](x T, accuracy A) T
- func ReduceFracTrunc[T, A constraints.Float](x T, accuracy A) T
- func StrictFrac[T constraints.Float](x T, fracLen int, round func(float64) float64) T
- func StrictFracCeil[T constraints.Float](x T, fracLen int) T
- func StrictFracFloor[T constraints.Float](x T, fracLen int) T
- func StrictFracRound[T constraints.Float](x T, fracLen int) T
- func StrictFracTrunc[T constraints.Float](x T, fracLen int) T
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalFloatDegree ¶ added in v0.1.33
func NormalFloatDegree[T constraints.Float](v T) int
func ReduceFrac ¶ added in v0.1.33
func ReduceFrac[T, A constraints.Float](x T, accuracy A, round func(float64) float64) T
func ReduceFracCeil ¶ added in v0.1.33
func ReduceFracCeil[T, A constraints.Float](x T, accuracy A) T
func ReduceFracFloor ¶ added in v0.1.33
func ReduceFracFloor[T, A constraints.Float](x T, accuracy A) T
func ReduceFracRound ¶ added in v0.1.33
func ReduceFracRound[T, A constraints.Float](x T, accuracy A) T
func ReduceFracTrunc ¶ added in v0.1.33
func ReduceFracTrunc[T, A constraints.Float](x T, accuracy A) T
func StrictFrac ¶ added in v0.1.35
func StrictFrac[T constraints.Float](x T, fracLen int, round func(float64) float64) T
func StrictFracCeil ¶ added in v0.1.35
func StrictFracCeil[T constraints.Float](x T, fracLen int) T
func StrictFracFloor ¶ added in v0.1.35
func StrictFracFloor[T constraints.Float](x T, fracLen int) T
func StrictFracRound ¶ added in v0.1.35
func StrictFracRound[T constraints.Float](x T, fracLen int) T
func StrictFracTrunc ¶ added in v0.1.35
func StrictFracTrunc[T constraints.Float](x T, fracLen int) T
Types ¶
type Number ¶ added in v0.1.36
type Number interface { constraints.Integer | constraints.Float }
Click to show internal directories.
Click to hide internal directories.