ordered

package module
v0.0.0-...-5872190 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp[T cmp.Ordered](n, low, high T) T

Clamp returns a value clamped between the given low and high values.

func First

func First[T cmp.Ordered](x T, y ...T) T

First returns the first non-default value of a fixed number of arguments of cmp.Ordered types.

func Max

func Max[T cmp.Ordered](a, b T) T

Max returns the larger of a and b.

func Min

func Min[T cmp.Ordered](a, b T) T

Min returns the smaller of a and b.

Types

This section is empty.

Jump to

Keyboard shortcuts

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