EN: Keep the specified number of decimal places for floating-point numbers.
ZH: 浮点数保留指定位。
Usage:
const ret1 = floatFixed(0.2);const ret2 = floatFixed(0.2, 2);console.log(ret1);console.log(ret2); Copy
const ret1 = floatFixed(0.2);const ret2 = floatFixed(0.2, 2);console.log(ret1);console.log(ret2);
Output:
0 0.20 Copy
0 0.20
EN: Keep the specified number of decimal places for floating-point numbers.
ZH: 浮点数保留指定位。
Usage:
Output: