I am attempting to implement a sine function using cordic method. I can't figure out how to reduce an arbitrary angle to -90 and 90 deg. For example, if an input is 390 deg, it should be reduced to 30 deg before passing to the cordic method. What algorithm can i use to efficiently reduce a arbitrary angle down to -90 and 90 deg.
Any help would be much appreciated