Round to the nearest hundredth

For questions about using Classic.

Post » Tue Jan 17, 2012 3:01 am

For example, I want the result for:

rounding 0.2198445 to return 0.21, to the nearest hundredth..

How?
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Tue Jan 17, 2012 6:39 am

Rounded to the nearest 100th would be 0.22

You can use the system expression "Format decimal number" = FormatDecimal(number, digits)

myRoundedNumber = float(FormatDecimal(0.2198445, 2)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests