math

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsSigned

func AbsSigned[T constraints.Signed](val T) T

AbsSigned returns the absolute value of a signed integer value.

func CompareOrdered

func CompareOrdered[T constraints.Ordered](lhs, rhs T) int

CompareOrdered compares two values satisfying constraints.Ordered and return a value less than, equal to, or greater than zero if lhs is found, respectively, to be less than, to match, or be greater than rhs.

Types

type Comparator

type Comparator[T any] func(lhs, rhs T) int

Compare two items and return a value less than, equal to, or greater than zero if lhs is found, respectively, to be less than, to match, or be greater than rhs.

Jump to

Keyboard shortcuts

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