Hi Jackson,
In JavaScript, there is the toFixed() method converts a number into a string, keeping a specified number of decimals.
codevar value = 85.08850817788226;
var v = value.toFixed(2);
The result of v is: 85.09/code
Hi Jackson,
In JavaScript, there is the toFixed() method converts a number into a string, keeping a specified number of decimals.
codevar value = 85.08850817788226;
var v = value.toFixed(2);
The result of v is: 85.09/code
Please note this is for output only cause further calculations can be broken.
oh cause my current position changes every time so my value would also change. Is there a way to convert it using that code on the link above.
Yes, you can see lots of simple possible solutions here: http://stackoverflow.com/questions/41...