mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-20 22:03:13 +01:00
Fixed atan2.
This commit is contained in:
@@ -124,6 +124,12 @@ namespace bx
|
||||
const float ay = abs(_y);
|
||||
const float maxaxy = max(ax, ay);
|
||||
const float minaxy = min(ax, ay);
|
||||
|
||||
if (maxaxy == 0.0f)
|
||||
{
|
||||
return 0.0f*sign(_y);
|
||||
}
|
||||
|
||||
const float mxy = minaxy / maxaxy;
|
||||
const float mxysq = square(mxy);
|
||||
const float tmp0 = mad(kAtan2C0, mxysq, kAtan2C1);
|
||||
|
||||
Reference in New Issue
Block a user