math

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShortUUID

func ShortUUID(prefix string) string

func TimeMS

func TimeMS() int64

Types

type ExpFilter

type ExpFilter struct {
	// contains filtered or unexported fields
}

func NewExpFilter

func NewExpFilter(alpha float64, maxVal float64) *ExpFilter

func (*ExpFilter) Apply

func (e *ExpFilter) Apply(exp float64, sample float64) float64

func (*ExpFilter) Filtered

func (e *ExpFilter) Filtered() float64

func (*ExpFilter) Reset

func (e *ExpFilter) Reset(alpha float64)

func (*ExpFilter) UpdateBase

func (e *ExpFilter) UpdateBase(alpha float64)

type MovingAverage

type MovingAverage struct {
	// contains filtered or unexported fields
}

func NewMovingAverage

func NewMovingAverage(windowSize int) *MovingAverage

func (*MovingAverage) AddSample

func (m *MovingAverage) AddSample(sample float64)

func (*MovingAverage) GetAvg

func (m *MovingAverage) GetAvg() float64

func (*MovingAverage) Reset

func (m *MovingAverage) Reset()

func (*MovingAverage) Size

func (m *MovingAverage) Size() int

Jump to

Keyboard shortcuts

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