- added custom math routines for reliability.

This commit is contained in:
Christoph Oelckers 2016-03-11 15:45:47 +01:00
commit 161d03231a
50 changed files with 4027 additions and 122 deletions

View file

@ -50,6 +50,7 @@
#include "i_system.h"
#include "po_man.h"
#include "r_state.h"
#include "math/cmath.h"
static const int PO_LINE_START = 1;
static const int PO_LINE_EXPLICIT = 5;
@ -74,7 +75,7 @@ angle_t FNodeBuilder::PointToAngle (fixed_t x, fixed_t y)
// 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));
double ang = g_atan2 (double(y), double(x));
#endif // __APPLE__ && !__llvm__
// Convert to signed first since negative double to unsigned is undefined.
return angle_t(int(ang * rad2bam)) << 1;