numeral

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormalizeUnitToByte

func FormalizeUnitToByte(raw string) (int64, error)

Formalize every readable unit (e.g. 10Mi 100G 30K 1024) to byte

func MaxFloat64

func MaxFloat64(nums []float64) float64

MaxFloat64 return the maximum num of nums.

1, 2, 3, 4, 5, 0 => 5

func MinFloat64

func MinFloat64(nums []float64, ignoreZeroOpt ...bool) float64

MinFloat64 return the minimal num of nums.

1, 2, 3, 4, 5, 0 => 0 1, 2, 3, 4, 5, 0 (ignoreZero) => 1

func Round

func Round(f float64, n int) float64

Round 保留小数点计算

func SubFloat64

func SubFloat64(f1, f2 float64) float64

SubFloat64 means (f1 - f2)

Types

This section is empty.

Jump to

Keyboard shortcuts

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