tofixed
Converts a number into a string, keeping a specified number of decimals.
Converts a number into a string, keeping a specified number of decimals.
Leading zeroes to a number
Converts a number into a string and returns the number by keeping a specified number of decimal after rounding to the nearest.
由于js中进行小数计算会有精度问题,此方法用于金额计算(保留小数点后两位小数,并进行四舍五入)
Fix two decimal cases in currency value without worrying about wrong math rounds.
toFixed rounding fix polyfill
Round each component of a double-precision complex floating-point number to the nearest multiple of 10^n toward positive infinity.
Round a double-precision floating-point number to the nearest multiple of 10^n toward negative infinity.
Round each component of a double-precision complex floating-point number to the nearest multiple of 10^n.
Round a numeric value to the nearest multiple of 10^n toward positive infinity.
Round each component of a double-precision complex floating-point number to the nearest multiple of 10^n toward negative infinity.
Round a numeric value to the nearest multiple of b^n on a linear scale.
Round a double-precision floating-point number to the nearest multiple of 10^n.
Round a numeric value to the nearest multiple of b^n toward zero.
Round a numeric value to the nearest multiple of 10^n toward zero.
一个专注于易用性的、精度准确的基本运算库