Add wrappers for the standard math library

Simplifies transition to software based math libraries
for projects requiring determinism.
This commit is contained in:
Matthew Endsley
2012-12-23 18:30:50 -08:00
parent 7b065f5e0c
commit b0e4e6a834
13 changed files with 64 additions and 40 deletions

View File

@@ -17,9 +17,9 @@
//
#define _USE_MATH_DEFINES
#include <math.h>
#include <string.h>
#include "DebugDraw.h"
#include "DetourMath.h"
duDebugDraw::~duDebugDraw()
@@ -180,8 +180,8 @@ void duAppendCylinderWire(struct duDebugDraw* dd, float minx, float miny, float
for (int i = 0; i < NUM_SEG; ++i)
{
const float a = (float)i/(float)NUM_SEG*DU_PI*2;
dir[i*2] = cosf(a);
dir[i*2+1] = sinf(a);
dir[i*2] = dtMathCosf(a);
dir[i*2+1] = dtMathSinf(a);
}
}