How do I round an angle to the nearest 90

Get help using Construct 2

Post » Fri Jun 27, 2014 10:01 am

Hi

Does anyone know if there is an expression or simple way to round an angle to the nearest 90 degrees?

Thanks
B
7
S
1
Posts: 16
Reputation: 732

Post » Fri Jun 27, 2014 10:51 am

You could do something like this:

roundedAngle = round(yourAngle / 90) * 90
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Fri Jun 27, 2014 12:04 pm

Ah clever, yes that will work. Thanks!
B
7
S
1
Posts: 16
Reputation: 732


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 47 guests