diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-28 13:26:24 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-28 13:26:24 +0100 |
commit | 9e08dc86b8b9fa9830574ff6116d4af5541fc47e (patch) | |
tree | 7a41d076ab1cdcb0282cae07b4ce3bf9b0069adc /src/critter.cpp | |
parent | 20e95a5cf095acbc9c76f335258a9bf5e220aaeb (diff) |
cleanup some math code
Diffstat (limited to 'src/critter.cpp')
-rw-r--r-- | src/critter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/critter.cpp b/src/critter.cpp index 9d7c860c..4068c782 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -191,9 +191,7 @@ void critter::update_playable(size_t i, float dt) auto off_i = Vector2i(offset_); if (!off_i.isZero()) { - offset_frac = - Vector2us(Vector2(Math::abs(std::fmod(offset_.x(), 1.f)), - Math::abs(std::fmod(offset_.y(), 1.f))) * frac); + offset_frac = Vector2us(Math::abs(Math::fmod(offset_, 1.f)) * frac); if (can_move_to(off_i)) { move_to(i, off_i, new_r); |