Replace RageFastSin and RageFastCos with standard library versions because the standard library is faster. Use fmod in spline evaluation.

This commit is contained in:
Kyzentun Keeslala
2016-02-07 15:35:05 -07:00
parent 9f57dd6caf
commit acda44238d
10 changed files with 71 additions and 135 deletions
+2 -2
View File
@@ -413,8 +413,8 @@ void CubicSpline::p_and_tfrac_from_t(float t, bool loop, size_t& p, float& tfrac
if(loop)
{
float max_t= static_cast<float>(m_points.size());
while(t >= max_t) { t-= max_t; }
while(t < 0.0f) { t+= max_t; }
t= std::fmod(t, max_t);
if(t < 0.0f) { t+= max_t; }
p= static_cast<size_t>(t);
tfrac= t - static_cast<float>(p);
}