saac

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: GPL-3.0 Imports: 1 Imported by: 1

README

SAAC

Simple Arithmetic Average Calculator

This calculator uses the built-in Golang's 'big' library and thus supports very big numbers.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

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

Calculator is a simple arithmetic average calculator.

func New

func New() (c *Calculator)

New is the constructor of the Calculator.

func (*Calculator) AddItemAndGetAverage

func (c *Calculator) AddItemAndGetAverage(item string) (avg string, err error)

AddItemAndGetAverage inserts a new item into the data series and returns a new simple arithmetic average value.

type ValueType

type ValueType = float64

ValueType is the type of elements used for calculation of Calculator.

Jump to

Keyboard shortcuts

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