math

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(number float64) float64

Abs

func BaseConvert

func BaseConvert(number string, frombase, tobase int) string

各种进制互转 BaseConvert("12312", 8, 16)

func Bindec

func Bindec(str string) int64

二进制转十进制

func Ceil

func Ceil(value float64) float64

Ceil

func Decbin

func Decbin(number int64) string

十进制转二进制

func Dechex

func Dechex(number int64) string

十进制转十六进制

func Decoct

func Decoct(number int64) string

十进制转八进制

func Floor

func Floor(value float64) float64

Floor

func Hexdec

func Hexdec(str string) int64

十六进制转十进制

func IsEven

func IsEven(number int) bool

判断数字是否是偶数

func IsNan

func IsNan(val float64) bool

IsNan

func IsOdd

func IsOdd(number int) bool

判断数字是否是奇数

func Max

func Max(nums ...float64) float64

Max

func Min

func Min(nums ...float64) float64

Min

func Octdec

func Octdec(str string) int64

八进制转十进制

func Pi

func Pi() float64

Pi

func Rand

func Rand(min, max int) int

Range: [0, 2147483647]

func Round

func Round(value float64, precision int) float64

Round

Types

This section is empty.

Jump to

Keyboard shortcuts

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