is it possible to map a value of rotation to be inside the range of 0-360 degrees?
For example:
Is there an easy solution? Maybe in mathutils?
best, chris
Zero Angle. A 360 degree angle and a zero angle might look the same. This is because if an object rotates zero degrees or degrees, the end result is the same.
The angle is calculated by the formula tan-1(x/y). Parameters : z : [array_like] A complex number or sequence of complex numbers. deg : [bool, optional] Return angle in degrees if True, radians if False (default).
Normalization of angles can be performed in two different ways. One method normalizes angles in the manner that longitudinal angles are normalized i.e., [0, 360.0) or [0, 2π) or [0, 24.0). The other method normalizes angles in the manner that latitudinal angles are normalized i.e., [-90, 90] or [-π/2, π/2].
For the purposes of designating a point in the plane, yes, 0 degrees equals 360 degrees.
You can use the modulo operator %
for this:
>>> print -10 % 360
350
>>> print 760 % 360
40
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With