umath

package
v0.1.76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max added in v0.1.34

func Max[T Number](a, b T) T

func Maxf added in v0.1.41

func Maxf[A Number, B Number](a A, b B) float64

func Min added in v0.1.34

func Min[T Number](a, b T) T

func Minf added in v0.1.41

func Minf[A Number, B Number](a A, b B) float64

func NormalFloatDegree added in v0.1.33

func NormalFloatDegree[T constraints.Float](v T) int

func Percent

func Percent[Minor Number, Major Number](minor Minor, major Major) int

func Rand

func Rand(min, max int) 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL