I want to check if a decimal has a value in the 4th significant figure.
//3 Significant figures
var val = 1.015;
//4 Significant figures
var val2 = 1.0155;
How can I test to see when there is a value in the 4th significant place.
I want to conditionaly display 3 or 4 decimal places depending if there is a non zero value in the 4th place.
What is the best way to do this?
Would this method work?
if((val * 10000) % 10 != 0) ...