diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-22 10:43:37 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-22 10:44:41 +0100 |
commit | dd0587d6a85625859bd2706db171ae891d8f3c79 (patch) | |
tree | 2b07ae100d8705f29a91a8526f0bdaa61c90a2dc | |
parent | 83b406546a3129c6091f8a4cbcadd6d829298c21 (diff) |
src/critter, editor/tests: fix subpixel accumulation
-rw-r--r-- | editor/tests/pathfinding.cpp | 2 | ||||
-rw-r--r-- | src/critter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/tests/pathfinding.cpp b/editor/tests/pathfinding.cpp index c999d22e..82009fdc 100644 --- a/editor/tests/pathfinding.cpp +++ b/editor/tests/pathfinding.cpp @@ -257,7 +257,7 @@ void pf_test::update_pre(app& a, const Ns& dt) } } else - C.offset_frac = Vector2us(Math::abs(Math::min({1.f,1.f}, offset_)) * frac); + C.offset_frac = Vector2us(Math::min({1.f,1.f}, Math::abs(offset_)) * frac); } if (!ok) [[unlikely]] diff --git a/src/critter.cpp b/src/critter.cpp index 2d0393f3..1fc3da76 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -210,7 +210,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r) else { can_move = true; - offset_frac = Vector2us(Math::abs(Math::min({1.f,1.f}, offset_)) * frac); + offset_frac = Vector2us(Math::min({1.f,1.f}, Math::abs(offset_)) * frac); break; } } |