numbertools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Average

func Average(x []float64) float64

Average ...

func BytesToFloat64

func BytesToFloat64(in []byte) (float64, error)

BytesToFloat64 ...

func Fibonacci

func Fibonacci(n, max int) int

Fibonacci generate fibonacci number

func Float64ToBytes

func Float64ToBytes(in float64) []byte

Float64ToBytes ...

func Float64ToString

func Float64ToString(in float64) string

Float64ToString ...

func IsInt

func IsInt(v interface{}) bool

IsInt check if value is integer

func Max

func Max[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64](args ...T) T

Max pick the greatest value from primitive arguments

func Median

func Median(x []float64) float64

Median ...

func ParseFloat32

func ParseFloat32(str string) (float32, error)

ParseFloat32 ...

func ParseFloat64

func ParseFloat64(str string) (float64, error)

ParseFloat64 ...

func RoundFloat64

func RoundFloat64(val float64, dec int) float64

RoundFloat64 raounds value

func StringToFloat64

func StringToFloat64(in string) (float64, error)

StringToFloat64 ...

func StringToInt

func StringToInt(in string) (int, error)

StringToInt ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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