gmath

package
v0.0.0-...-f130474 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Number](n T) T

func Clamp

func Clamp[T Number](low, n, high T) T

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

func Max

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

func Min

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

Types

type Number

type Number interface {
	constraints.Float | constraints.Integer
}

Jump to

Keyboard shortcuts

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