2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-01 01:25:38 +03:00

Fixed Q_sqrt with long double

This commit is contained in:
asmodai 2016-04-22 01:18:20 +03:00
parent 17c7e304c5
commit 8d0957f9ed

View File

@ -67,16 +67,13 @@ inline float M_sqrt(float value) {
inline double M_sqrt(double value) { inline double M_sqrt(double value) {
double ret; double ret;
auto v = _mm_load_sd(&value); auto v = _mm_load_sd(&value);
_mm_store_pd(&ret, _mm_sqrt_sd(v, v)); _mm_store_sd(&ret, _mm_sqrt_sd(v, v));
return ret; return ret;
} }
inline double M_sqrt(long double value) inline double M_sqrt(long double value)
{ {
double ret; return M_sqrt(double(value));
auto v = _mm_load_sd((double *)&value);
_mm_store_pd(&ret, _mm_sqrt_sd(v, v));
return ret;
} }
float anglemod(float a); float anglemod(float a);