summaryrefslogtreecommitdiffhomepage
path: root/editor/tests/raycast-test.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-04 05:11:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-04 05:11:44 +0100
commit7d7189b02ee81abedfebf270a3306a25fc9ab4c5 (patch)
treea10574198014bb1ada510208fb11d67bee7131e7 /editor/tests/raycast-test.cpp
parent47e263b5c53b2bb8b00b846340d74809f777d7b0 (diff)
a
Diffstat (limited to 'editor/tests/raycast-test.cpp')
-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 d769a91f..1abffa72 100644
--- a/editor/tests/raycast-test.cpp
+++ b/editor/tests/raycast-test.cpp
@@ -548,8 +548,8 @@ struct raycast_test : base_test
auto off = chunk_offsets[i][j];
auto pt0 = pt - Vector2i(size/2), pt1 = pt0 + Vector2i(size);
auto pt0_ = pt0 - off, pt1_ = pt1 - off;
- if (!within_chunk_bounds(pt0_, pt1_)) continue;
auto [fmin, fmax] = Math::minmax(Vector2(pt0_), Vector2(pt1_));
+ if (!within_chunk_bounds(pt0_, pt1_)) continue;
auto ch_off = (center.chunk() - from.chunk() + Vector2i(i-1, j-1)) * chunk_size<int>;
//Debug{} << ch_off << off << Vector2i(center.chunk()) + Vector2i(i-1, j-1);
origin = Vector2((Vector2i(from.local()) * tile_size<int>) + Vector2i(from.offset()) - ch_off);