Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clamp ¶
func Clamp[T constraints.Ordered](min, val, max T) T
Clamp returns the val, clamped between min and max. Clamp panics if max is less than min.
func Max ¶
func Max[T constraints.Ordered](values ...T) T
Max returns the largest value of all provided values.
func Min ¶
func Min[T constraints.Ordered](values ...T) T
Min returns the smallest value of all provided values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.