3 ms·
The idea is rounding the result of operations with JS float numbers, float 0.1025 * 14 should give 1.435 but gives 1.4349999999999998 and when I try to round to
by ktowen 3y ago
The idea is rounding the result of operations with JS float numbers, float 0.1025 * 14 should give 1.435 but gives 1.4349999999999998 and when I try to round to 2 decimal places it will give 1.43 instead of 1.44