X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FQuaternions.h;h=ba1eedb3426ead392ccb2661c88a05f2e91df08e;hb=bcb5c54b2b6170c185583c18f5ec97b0bb813f0a;hp=872500c9ddd8371d4f413515fc7a1eb685c7f2f9;hpb=0cca0c495c7dc29d134a10d7eed5de1f377c99bf;p=lugaru.git diff --git a/Source/Quaternions.h b/Source/Quaternions.h index 872500c..ba1eedb 100644 --- a/Source/Quaternions.h +++ b/Source/Quaternions.h @@ -8,8 +8,8 @@ //#include "Carbon.h" #include "math.h" -#include "Physicsmath.h" -#include "gl.h" +#include "PhysicsMath.h" +#include "gamegl.h" /**> Quaternion Structures <**/ #define PI 3.14159265355555897932384626 @@ -207,9 +207,7 @@ inline void CrossProduct(XYZ P, XYZ Q, XYZ *V){ inline float fast_sqrt (register float arg) { -#ifdef WIN32 - return sqrtf( arg); -#else +#if PLATFORM_MACOSX // Can replace with slower return std::sqrt(arg); register float result; @@ -224,6 +222,8 @@ inline float fast_sqrt (register float arg) result = result + 0.5 * result * (1.0 - arg * result * result); return result * arg; +#else + return sqrtf( arg); #endif } @@ -463,4 +463,4 @@ inline bool DistancePointLine( XYZ *Point, XYZ *LineStart, XYZ *LineEnd, float * return 1; } -#endif \ No newline at end of file +#endif