summaryrefslogtreecommitdiffhomepage
path: root/editor/tests
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-02 11:38:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-02 11:38:37 +0100
commitb98f3159744b800e664d2aae61aa6faf9453f057 (patch)
treecc1a967de80af2c837bc8a47ea7857104985b9f7 /editor/tests
parentf8663e13d49e50412c2faccf0d6c46bc3a90a9f1 (diff)
c
Diffstat (limited to 'editor/tests')
-rw-r--r--editor/tests/raycast-test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/tests/raycast-test.cpp b/editor/tests/raycast-test.cpp
index 24f0fde2..ec0dc5ec 100644
--- a/editor/tests/raycast-test.cpp
+++ b/editor/tests/raycast-test.cpp
@@ -225,7 +225,7 @@ struct raycast_test : base_test
auto size = Vector2ui(Math::round(Math::abs(v)));
const auto half = Vector2i(v*.5);
- auto nsteps = (uint32_t)Math::ceil(Math::abs(vec[long_axis] / step));
+ auto nsteps = (uint32_t)Math::max(1., Math::ceil(Math::abs(vec[long_axis] / step)));
result.path.clear();
result.path.reserve(nsteps);