I'm trying to check if a number inputed has over 8 decimal places and if it does then I want to round it back down to 8 decimal places. However, when I input the number 1.234001, it automatically rounds it to 8 decimal places. (1.234001 / 0.00000001) % 1 = 0 so I'm not sure why its rounding it. Here's my code
var SAT = 0.00000001;
if(!isNaN(input.value) && ((input.value / SAT) % 1 != 0)) {
input.value = parseFloat(input.value).toFixed(8);
console.log(6);
}