Documentation ¶
Index ¶
- func Abs[T Number](n T) T
- func Clamp[T Number](low, n, high T) T
- func GCD[T constraints.Integer](a, b T) T
- func LCM[T constraints.Integer](vs ...T) T
- func ManhattanDistance[T Number](x1, y1, x2, y2 T) T
- func Max[T Number](a, b T) T
- func Min[T Number](a, b T) T
- func Sign[T Number](v T) int
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GCD ¶
func GCD[T constraints.Integer](a, b T) T
func LCM ¶
func LCM[T constraints.Integer](vs ...T) T
func ManhattanDistance ¶
func ManhattanDistance[T Number](x1, y1, x2, y2 T) T
Types ¶
type Number ¶
type Number interface { constraints.Float | constraints.Integer }
Click to show internal directories.
Click to hide internal directories.