mathx

package
v0.0.0-...-2d47422 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 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 constraints.Integer](t T) T

func Max

func Max[T constraints.Ordered](v1 T, v2 T) T

func Min

func Min[T constraints.Ordered](v1 T, v2 T) T

func RoundPlaces

func RoundPlaces(v float64, places int) float64

Types

type Range

type Range[T constraints.Ordered] struct {
	Min T
	Max T
}

func NewRange

func NewRange[T constraints.Ordered](min, max T) Range[T]

func (Range[T]) Contains

func (r Range[T]) Contains(t T) bool

Jump to

Keyboard shortcuts

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