math

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualsAny

func EqualsAny[T comparable](lhs T, others ...T) bool

EqualsAny returns true if lhs is equal to any item in others

func Max

func Max[T constraints.Ordered](items ...T) T

Max calculates the maximum of a list of ordered items, returning it. Note that, if this function is called with no arguments, then it will panic as it depends on at least one item being in the slice

func Min

func Min[T constraints.Ordered](items ...T) T

Min calculates the minimum of a list of ordered items, returning it. Note that, if this function is called with no arguments, then it will panic as it depends on at least one item being in the slice

func VerifyInteger

func VerifyInteger(decimal float64) (int64, error)

VerifyInteger converts a floating-point number to an integer and verifies that no information will be lost in doing so. If this is not the case then an error will be returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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