2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +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) {
double ret;
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;
}
inline double M_sqrt(long double value)
{
double ret;
auto v = _mm_load_sd((double *)&value);
_mm_store_pd(&ret, _mm_sqrt_sd(v, v));
return ret;
return M_sqrt(double(value));
}
float anglemod(float a);