translate this command.

I need a small help with a funciton that i didn't understand in an exercice
it says:

if (alp1<=-360 && alp1 >=360) alp1=fmod(alp1,360)*PI/180;

what does that mean?
specially the second part.
thank you :))
Last edited on
You may have the expression incorrect. The conditional says, if alp1 is less than or equal to -360 AND if alp1 is greater than or equal to 360. That conditional will always be false, so the fmod and assignment will never happen.
As doug4 says && is probably meant to be ||.
Given that alp1 is a double type fmod returns the remainder of alp1/360.
The rest converts degrees to radians... I think.
Thank you all for your answer :)
problem solved :) exactly buffbill,and doug4 it should be or, ||
THANKS AGAIN! and happy easter!
Topic archived. No new replies allowed.