The number I get after the process is 1.73466457756. How can I print this as 1.7? I want to round the number. which java code can i write
Just for clarity - we will use JavaScript for this rather than JAVA.
prez.variable("round",Math.round(prez.variable("myNum")*10)/10);
Where the variable named round is your newly rounded value and the variable named myNum is the original value to be rounded.
Hope this helps.
3 Likes