math

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: BSD-2-Clause Imports: 2 Imported by: 2

README

Validation

This repo contains helps for validation objects.

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.

Jump to

Keyboard shortcuts

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