numbertools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 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 converts input slice of bytes value into output float64 value.

func Fibonacci

func Fibonacci(n, max int) int

Fibonacci generate fibonacci number

func Float64ToBytes

func Float64ToBytes(in float64) []byte

Float64ToBytes converts input float64 value into output slice of bytes value.

func Float64ToString

func Float64ToString(in float64) string

Float64ToString converts input float64 value into output string value.

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 converts input string value into output float64 value.

func StringToInt

func StringToInt(in string) (int, error)

StringToInt converts input string value into output int value.

func StringToInt64 added in v0.1.1

func StringToInt64(in string) (int64, error)

StringToInt64 converts input string value into output int64 value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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