math

package module
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: BSD-2-Clause Imports: 2 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Validation

This repo contains helps for validation objects.

License

This project is licensed under the BSD-style license. See the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T ~float64 | ~int64 | ~int](value T) T

func Avg

func Avg[T ~float64 | ~int64 | ~uint64 | ~int](values []T) *T

func Changes

func Changes[T ~float64 | ~int64 | ~int](values []T) []T

Changes return changes between values (result has length-1 elements)

func Diff

func Diff[T ~float64 | ~int64 | ~uint64 | ~int](a T, b T) *float64

func Ema

func Ema[T ~float64 | ~int64 | ~uint64 | ~int](values []T) *T

Ema calculates the Exponentially Weighted Moving Average

func Float64AlmostEqual

func Float64AlmostEqual(a, b float64) bool

func Max

func Max[T ~float64 | ~int64 | ~uint64 | ~int](values []T) *T

func Min

func Min[T ~float64 | ~int64 | ~uint64 | ~int](values []T) *T

func Negative

func Negative[T ~float64 | ~int64 | ~uint64 | ~int](values []T) []T

func Positive

func Positive[T ~float64 | ~int64 | ~uint64 | ~int](values []T) []T

func Round

func Round[T ~float64](value T) T

func Sqrt

func Sqrt[T ~float64](x T) T

func Sum

func Sum[T ~float64 | ~int64 | ~uint64 | ~int](values []T) T

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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