> if (((test>=0) && (test<=90)) || ((test>270) && (test<=360))){n_y=1;}
> else {n_y=-1;}
I need the magnitude of trigonometric function in order to determine the sign of the trigonometric function for an angle falling into a particular quadrant.
My plan is to replace the code above with something equivalent.
Here is what I want to do in pseudo-code.
n_y = cos(test) / (magnitude of cos (test));
This will give me same thing. Abs() only takes integers. Any help is appreciated.