06-20-2023 05:40 AM
Hi Team,
I was using the Math.round() but was wondering if we can decide on the decimal digits for the rounding.
For example, number = 3.14125252
Desired output = 3.14
With Math.round(), output is 3.
Any suggestions on how to use the native Round(number,2)
format?
Thank you.
Regards,
Darsh
Solved! Go to Solution.
06-20-2023 06:28 AM
06-20-2023 06:41 AM
Thank you @Soni37 for the insights.
I had to convert my string to a number and then apply this formula. I was also able to learn more about .toPrecision()
Link to the documentation
Thank you again.
06-20-2023 06:28 AM
06-20-2023 06:41 AM
Thank you @Soni37 for the insights.
I had to convert my string to a number and then apply this formula. I was also able to learn more about .toPrecision()
Link to the documentation
Thank you again.