mathx

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

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