Documentation ¶
Overview ¶
Package maths provides generic arithmetic operations.
Index ¶
- func Choose[V any](ok bool, yes, no V) V
- func ChooseFunc[V any](ok bool, yes, no func() V) V
- func ChooseFuncE[V any](ok bool, yes, no func() (V, error)) (V, error)
- func Max[X cmp.Ordered](a, b X) X
- func MaxOf[X cmp.Ordered](a X, bb ...X) X
- func Min[X cmp.Ordered](a, b X) X
- func MinOf[X cmp.Ordered](a X, bb ...X) X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseFunc ¶ added in v0.5.0
ChooseFunc will evaluate and return yes when ok is true, and no when ok is false.
func ChooseFuncE ¶ added in v0.5.0
ChooseFuncE will evaluate and return yes when ok is true, and no when ok is false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.