How do I round roots to at three decimal places

Get help using Construct 2

Post » Fri Oct 28, 2016 9:04 pm

How to round roots to three decimal places, eg sqrt (2) should give 1:41
and sqrt (6) or sqrt (8) should appear only 2.45 and 2.82 respectively
B
30
S
9
G
3
Posts: 280
Reputation: 4,212

Post » Fri Oct 28, 2016 9:16 pm

Code: Select all
round(sqrt(2) * 100)/100

This should give you the expected result.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Fri Oct 28, 2016 9:26 pm

Thanks
B
30
S
9
G
3
Posts: 280
Reputation: 4,212


Return to How do I....?

Who is online

Users browsing this forum: engin20020, rbailey83, tarek2, Yahoo [Bot] and 23 guests