mathext

package
v0.0.72 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs added in v0.0.19

func Abs[T langext.NumberConstraint](v T) T

func ArrMax added in v0.0.6

func ArrMax[T langext.OrderedConstraint](v []T) T

func ArrMin added in v0.0.6

func ArrMin[T langext.OrderedConstraint](v []T) T

func AvgFloat64

func AvgFloat64(arr []float64) float64

func Clamp added in v0.0.19

func Clamp[T langext.NumberConstraint](v T, min T, max T) T

func ClampFloat32

func ClampFloat32(v float32, lo float32, hi float32) float32

func ClampFloat64

func ClampFloat64(v float64, lo float64, hi float64) float64

func ClampInt

func ClampInt(v int, lo int, hi int) int

func ClampInt32

func ClampInt32(v int32, lo int32, hi int32) int32

func Float64EpsilonEq

func Float64EpsilonEq(v1 float64, v2 float64, eps float64) bool

func Max

func Max[T langext.OrderedConstraint](v1 T, v2 T) T

func Mean

func Mean[T langext.FloatConstraint](v []T) T

func Median

func Median[T langext.FloatConstraint](v []T) T

func Min

func Min[T langext.OrderedConstraint](v1 T, v2 T) T

func Sum

func Sum[T langext.NumberConstraint](v []T) T

func SumFloat64

func SumFloat64(arr []float64) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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