Search results
37 packages found
Round a double-precision floating-point number to the nearest multiple of 10^n.
Similar to .toFixed(), but can be ceil, floor or round (default)
Round a double-precision floating-point number to the nearest multiple of 10^n toward negative infinity.
Round a numeric value to the nearest multiple of 10^n toward positive infinity.
Round a numeric value to the nearest multiple of 10^n toward zero.
Round a numeric value to the nearest multiple of b^n on a linear scale.
Round each component of a double-precision complex 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.
- stdlib
- stdmath
- mathematics
- math
- math.round
- round
- roundn
- cround
- integer
- nearest
- value
- fix
- tofixed
- complex
- View more
Round a numeric value to the nearest multiple of b^n toward zero.
Round each component of a double-precision complex floating-point number to the nearest multiple of 10^n toward positive infinity.
A package for rounding numbers to an exact, minimum, or maximum number of decimal places.
修正toFixed方法保留小数位的错误 To fix the error of the toFixed method not preserving decimal places
This library can solve one well known problem with JavaScript Number arithmetic imprecise, when, for example, 3.3 * 3 becomes 9.899999999999999, ugly.
A useful number utils library
Converts a number into a string, keeping a specified number of decimals.
Math.round with fixed, formats a number using fixed-point notation and returns a number.
number的工具箱:round、toFixed纠正;负数千分符,数字转中文
Math.floor with fixed, formats a number using fixed-point notation and returns a number.
Math.ceil with fixed, formats a number using fixed-point notation and returns a number.
Converts a number into a string and returns the number by keeping a specified number of decimal after rounding to the nearest.