You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return sign * ((((((T(-9.580235e-4) * x + T(1.025743e-2)) * x - T(1.964406e-3)) * x - T(1.656241e-1)) * x - T(2.652585e-4)) * x + T(1.000025e-0)) * x - T(3.973469e-7))
36
+
/ ((((((T(-9.580235e-4) * x - T(1.228280e-3)) * x + T(4.313990e-2)) * x - T(8.634596e-4)) * x - T(4.997638e-1)) * x - T(2.400507e-5)) * x + T(1.000000e-0));
37
+
}
38
+
39
+
template<typename T>
40
+
GLM_FUNC_QUALIFIER T asinPoly(T x)
41
+
{
42
+
return ((((((T(1.550104e-1) * x - T(6.284173e-2)) * x + T(5.446719e-2)) * x + T(1.561094e-1)) * x + T(9.531123e-4)) * x + T(9.999680e-1)) * x + T(1.740546e-7));
43
+
}
44
+
45
+
template<typename T>
46
+
GLM_FUNC_QUALIFIER T acosPoly(T x)
47
+
{
48
+
return ((((((T(-1.550104e-1) * x + T(6.284173e-2)) * x - 5.446719e-2) * x - T(1.561094e-1)) * x - T(9.531123e-4)) * x - T(9.999680e-1)) * x + T(1.570796e-0));
49
+
}
28
50
}//namespace detail
29
51
30
52
// wrapAngle
31
53
template<typename T>
32
54
GLM_FUNC_QUALIFIER T wrapAngle(T angle)
33
55
{
56
+
//glm::trunc() is much faster than glm::mod but i got an error when i try to use it
return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));
return detail::functor2<vec, L, T, Q>::call(fastAtan, y, x);
129
192
}
130
-
193
+
// atan
131
194
template<typename T>
132
195
GLM_FUNC_QUALIFIER T fastAtan(T x)
133
196
{
134
-
return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));
0 commit comments