Skip to content
Snippets Groups Projects
Commit b2e19ecd authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

copysignf() was C99-only

parent 02dcf6aa
No related branches found
No related tags found
No related merge requests found
......@@ -123,15 +123,15 @@ static inline float fast_atan2f(float y, float x) {
if(x2<y2){
float den = (y2 + cB*x2) * (y2 + cC*x2);
if (den!=0)
return -x*y*(y2 + cA*x2) / den + copysignf(cE,y);
return -x*y*(y2 + cA*x2) / den + (y<0 ? -cE : cE);
else
return copysignf(cE,y);
return (y<0 ? -cE : cE);
}else{
float den = (x2 + cB*y2) * (x2 + cC*y2);
if (den!=0)
return x*y*(x2 + cA*y2) / den + copysignf(cE,y) - copysignf(cE,x*y);
return x*y*(x2 + cA*y2) / den + (y<0 ? -cE : cE) - (x*y<0 ? -cE : cE);
else
return copysignf(cE,y) - copysignf(cE,x*y);
return (y<0 ? -cE : cE) - (x*y<0 ? -cE : cE);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment