mirror of https://github.com/AxioDL/zeus.git
Windows fix
This commit is contained in:
parent
070a8d7854
commit
cd3d2ee133
|
@ -7,7 +7,7 @@
|
||||||
#ifndef _USE_MATH_DEFINES
|
#ifndef _USE_MATH_DEFINES
|
||||||
#define _USE_MATH_DEFINES 1
|
#define _USE_MATH_DEFINES 1
|
||||||
#endif
|
#endif
|
||||||
#include <cmath>
|
#include <math.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "CVector3f.hpp"
|
#include "CVector3f.hpp"
|
||||||
|
|
|
@ -46,8 +46,13 @@ double sqrtD(double val)
|
||||||
}
|
}
|
||||||
double q;
|
double q;
|
||||||
#if __SSE__
|
#if __SSE__
|
||||||
__m128d splat { val };
|
union
|
||||||
q = _mm_sqrt_pd(splat)[0];
|
{
|
||||||
|
__m128d v;
|
||||||
|
double d[2];
|
||||||
|
} qv = { val };
|
||||||
|
qv.v = _mm_sqrt_sd(qv.v, qv.v);
|
||||||
|
q = qv.d[0];
|
||||||
#else
|
#else
|
||||||
// le sigh, let's use Carmack's inverse square -.-
|
// le sigh, let's use Carmack's inverse square -.-
|
||||||
union
|
union
|
||||||
|
|
Loading…
Reference in New Issue