[SOLVED]Opposite Angle In Degrees

Get help using Construct 2

Post » Sat Sep 24, 2011 11:05 pm

I been Google-ing but cant find the right answer. This is my last hope.

Trying to get the formula for an angle that is it's direct opposite. I can get it just fine from angles 0 to 180 by adding subtracting 360 from it but from 181 to 360, thats a different story.

Ok let's say I'm trying to get the opposite side for 300 which is 120. I been racking my brains on this for hours.

Any help from math wiz's will be appreciated! huyngo2011-09-25 00:22:44
B
2
G
1
Posts: 5
Reputation: 460

Post » Sat Sep 24, 2011 11:41 pm

Alright. I've got this one!
So if we add 180 to 300, we get 480. Now, if we modulus* 480 by 360, we get 120 (Construct does modulus automatically for angles). Easy peasy flaming lemons.

In general, the solution is simply to add 180 to the angle you're trying to make opposite.

*The remainder of division between two numbers.TheBen2011-09-24 23:41:30
B
8
S
2
G
6
Posts: 44
Reputation: 3,007

Post » Sun Sep 25, 2011 12:22 am

Thanks it's perfect!
B
2
G
1
Posts: 5
Reputation: 460

Post » Sun Jul 07, 2013 9:59 am

Can I have the math for doing this manually since I'm using a number and not an angle?
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Sun Jul 07, 2013 10:52 am

@silkc2

the modulus operator is %

(180+300)%360 = 120
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sun Jul 07, 2013 12:01 pm

Thanks!
B
20
S
6
G
2
Posts: 157
Reputation: 3,109


Return to How do I....?

Who is online

Users browsing this forum: Megavolt, mnashwan, stylie1 and 18 guests