Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
3 years ago
Solved

Can we round integers to 2 digits?

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