Skip to content

Commit

Permalink
Update library/src/animationManager.cxx
Browse files Browse the repository at this point in the history
Co-authored-by: Michael MIGLIORE <[email protected]>
  • Loading branch information
mwestphal and Meakk authored Dec 16, 2024
1 parent 24f84cc commit fe38947
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions library/src/animationManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,8 @@ void animationManager::Tick()
// Modulo computation, compute CurrentTime in the time range.
if (this->CurrentTime < this->TimeRange[0] || this->CurrentTime > this->TimeRange[1])
{
auto modulo = [](double val, double mod)
{
const double remainder = fmod(val, mod);
return remainder < 0 ? remainder + mod : remainder;
};
this->CurrentTime = this->TimeRange[0] +
modulo(this->CurrentTime - this->TimeRange[0], this->TimeRange[1] - this->TimeRange[0]);
std::remainder(this->CurrentTime - this->TimeRange[0], this->TimeRange[1] - this->TimeRange[0]);
}

if (this->LoadAtTime(this->CurrentTime))
Expand Down

0 comments on commit fe38947

Please sign in to comment.