I am building a manual / by-hand / judgmental factor rotation function.
Obviously, rotating the two-dimensional coordinate system 270°
is the same as -90°
and 720°
is the same as 0°
.
I'd like to simplify user input such that all values are between -180°
and 180°
.
How can I do that elegantly in R?
Ps.: Or would it make more sense to store values from 0°
to 360°
?
Users may want to rotate clock- and counterclockwise, so I think -180
to 180
may be more intuitive from a UX point of view.