mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 14:22:13 +00:00
Added work-around for vectorization issue in Apple's GCC 4.x
This commit is contained in:
parent
0a5dd94072
commit
2efb62e8ef
1 changed files with 6 additions and 0 deletions
|
@ -69,7 +69,13 @@ static const int PO_LINE_EXPLICIT = 5;
|
|||
angle_t FNodeBuilder::PointToAngle (fixed_t x, fixed_t y)
|
||||
{
|
||||
const double rad2bam = double(1<<30) / M_PI;
|
||||
#if defined __APPLE__ && !defined __llvm__
|
||||
// Work-around for vectorization issue in Apple's GCC 4.x
|
||||
// See https://gcc.gnu.org/wiki/Math_Optimization_Flags for details
|
||||
long double ang = atan2l (double(y), double(x));
|
||||
#else // !__APPLE__ || __llvm__
|
||||
double ang = atan2 (double(y), double(x));
|
||||
#endif // __APPLE__ && !__llvm__
|
||||
return angle_t(ang * rad2bam) << 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue