I am learning about CORDIC and implementing it in Verilog. I found this example which can calculate sin and cos for angles in the first quadrant (0-90). https://github.com/freecores/verilog_cordic_core/blob/master/cordic.v
How would I modify this code to calculate sin and cos for -360 to 360 degrees. Would it be with if-else statements on the angle input? Where would that be placed for this code?
I understand I need to subtract or add a multiple of 90degrees to get the angle into the first quadrant. Depending on which quadrant I rotated from I flip the value of sin & cos and/or change the sign of the result