diff --git a/regamedll/dlls/animation.cpp b/regamedll/dlls/animation.cpp index e8f0ab0f..3382ea48 100644 --- a/regamedll/dlls/animation.cpp +++ b/regamedll/dlls/animation.cpp @@ -615,22 +615,22 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt) float sclp, sclq; float cosom = (p[0] * q[0] + p[1] * q[1] + p[2] * q[2] + p[3] * q[3]); - if ((1.0 + cosom) > 0.00000001) + if ((1.0f + cosom) > 0.000001f) { - if ((1.0 - cosom) > 0.00000001) + if ((1.0f - cosom) > 0.000001f) { real_t cosomega = Q_acos(real_t(cosom)); float omega = cosomega; float sinom = Q_sin(cosomega); - sclp = Q_sin((1.0 - t) * omega) / sinom; + sclp = Q_sin((1.0f - t) * omega) / sinom; sclq = Q_sin(real_t(omega * t)) / sinom; } else { sclq = t; - sclp = 1.0 - t; + sclp = 1.0f - t; } for (i = 0; i < 4; i++) @@ -643,8 +643,8 @@ void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt) qt[2] = -q[3]; qt[3] = q[2]; - sclp = Q_sin((1.0 - t) * 0.5 * M_PI); - sclq = Q_sin(t * 0.5 * M_PI); + sclp = Q_sin((1.0f - t) * (0.5f * M_PI)); + sclq = Q_sin(t * (0.5f * M_PI)); for (i = 0; i < 3; i++) qt[i] = sclp * p[i] + sclq * qt[i];