How can I divide degrees greater than 360 to be within the 360 degrees?

798 Views Asked by At

I've got a rotation of something in degrees, however this rotation can be greater than 360 or less than 0.

How can I multiply/divide this to be within 360? For example, 1800 to be turned into 360, 900 turned into 180, etc?

1

There are 1 best solutions below

1
On BEST ANSWER

Method 1

Subtract 360 till you reach the range you desire. (by antman from the comments)

Method 2

If programming codes can be used then the modulus operator ' % ' can be used to find the remainder.

Example:
900 % 360=180
General form:
$x$%360=[value]

Modulus operator gives the remainder when we divide the degrees by 360.

Reason

After a complete rotation (covering 360 degrees) we come back to zero.