gnum

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(number float64) float64

Abs abs()

func Ceil

func Ceil(value float64) float64

Ceil ceil()

func Floor

func Floor(value float64) float64

Floor floor()

func IsNumeric

func IsNumeric(val interface{}) bool

IsNumeric is_numeric() Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. Thus +0123.45e6 is a valid numeric value. In PHP hexadecimal (e.g. 0xf4c3b00c) is not supported, but IsNumeric is supported.

func Max

func Max(nums ...float64) float64

Max max()

func Min

func Min(nums ...float64) float64

Min min()

func Rand

func Rand(min, max int) int

Rand rand() Range: [0, 2147483647]

func RandInt64

func RandInt64(min, max int64) int64

生成m-n之间的随机数

func Round

func Round(f float64, n int) float64

对浮点数进行四舍五入操作比如 12.125保留2位小数==>12.13

Types

This section is empty.

Jump to

Keyboard shortcuts

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