Documentation ¶
Index ¶
- Constants
- func AddToSet(slice *[]float64, n float64) bool
- func Average(f []float64) float64
- func Clamped(v, min, max float64) float64
- func Clamped32(v, min, max float32) float32
- func GetAny(i any) (float64, error)
- func IsInSlice(n float64, slice []float64) bool
- func Join64(ids []int64, sep string) string
- func KeepFractionDigits(f float64, digits int) float64
- func Max32(a, b float32) float32
- func MaxKeyOfMap(m map[string]float64) (key string, value float64)
- func Maximize(a *float64, b float64) bool
- func Maximize32(a *float32, b float32) bool
- func Min32(a, b float32) float32
- func Minimize(a *float64, b float64) bool
- func Minimize32(a *float32, b float32) bool
- func MixedValueAtIndex(slice []float64, index float64) float64
- func MixedValueAtT(slice []float64, t float64) float64
- func SetAny(num any, f float64) error
- func SplitStringTo64(str string, sep string) []float64
- func StringsTo64(snums []string) []float64
- func Sum(all []float64) float64
- func ToStrings64(floats []float64) (s []string)
- type Slice
Constants ¶
View Source
const Undefined = math.MaxFloat32
Variables ¶
This section is empty.
Functions ¶
func KeepFractionDigits ¶
func Maximize32 ¶
func Minimize32 ¶
func MixedValueAtIndex ¶
MixedValueAtIndex returns a mix of the value before and after index; So if index is 4.25, it will return a mix of 75% [4] and 25% [5]
func MixedValueAtT ¶
MixedValueAtT returns the mix beween the values t lies within using MixedValueAtIndex t is 0-1, corresponding to 0 as 100% of [0] and 1 as 100% the last slice element.
func SplitStringTo64 ¶
func StringsTo64 ¶
func ToStrings64 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.