Hi, i have an angle that can range from - 10000 to 10000 and could like to know what angle its on in a 0 - 360 spectrum.

Eg. 1145 would equal 65

-20 would equal 340

Cheers

Printable View

- May 7th 2010, 06:27 PMmrwelcamBreak down angle to 360 degrees
Hi, i have an angle that can range from - 10000 to 10000 and could like to know what angle its on in a 0 - 360 spectrum.

Eg. 1145 would equal 65

-20 would equal 340

Cheers - May 7th 2010, 09:37 PMFohr
- May 7th 2010, 09:46 PMMobiusJoe
It's really late, but the basic formula is going to be something like

for x > 360, take the remainder of x/360.

400, for example. 400/360 is 1 (throw that away) with a remainder of 40, or think of it as 40 degrees past one full circle.

For x < 0 ....

take x + (360+360*INT(x/360))

meaning -20 gives

-20 + 360 + 0, or 340.

-400 gives us

-400 + 360 + (360*1) or 720 - 400 = 320.

Double check that, but it looks close.