math2

package
v0.0.0-...-9f5570a Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Round

func Round(x float64) float64

Round returns the nearest integer, rounding ties away from zero.

func Round4BitMEX

func Round4BitMEX(x float64, precision int) float64

Round4BitMEX 类似四舍五入法 XBT: precision=0 0,0.5,1.0,1.5... ETH: precision=1 0.05,0.10,0.15...

func RoundToEven

func RoundToEven(x float64) float64

RoundToEven returns the nearest integer, rounding ties to an even number.

func RoundToEven5

func RoundToEven5(x float64) float64

RoundToEven5 类似四舍五入法,规整到 0,0.5,1.0,1.5...

func ToFixed

func ToFixed(num float64, precision int) float64

func ToFloat64

func ToFloat64(x string) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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