diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-12-04 05:19:06 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-08-30 12:13:11 +0100 |
commit | 0046d320bb80600d38395c7622a2c5d9be2ed811 (patch) | |
tree | 75755bc9ded75942cc2c1a4df5b73fe00dd1ff28 /tests/core/math | |
parent | 889c522a1954a11df93e3db59f61e41967c099d7 (diff) |
Fix Geometry3D::get_closest_points_between_segments() returns NaN
Also fix:
- Geometry3D::get_closest_distance_between_segments() returning
incorrect values.
- Test for Geometry3D::get_closest_distance_between_segments() testing for
an incorrect value.
Diffstat (limited to 'tests/core/math')
-rw-r--r-- | tests/core/math/test_geometry_3d.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/core/math/test_geometry_3d.h b/tests/core/math/test_geometry_3d.h index 99a4ef2d46..23bbf1e183 100644 --- a/tests/core/math/test_geometry_3d.h +++ b/tests/core/math/test_geometry_3d.h @@ -63,7 +63,7 @@ TEST_CASE("[Geometry3D] Closest Distance Between Segments") { p_1(p_p_1), p_2(p_p_2), p_3(p_p_3), p_4(p_p_4), want(p_want){}; }; Vector<Case> tt; - tt.push_back(Case(Vector3(1, -2, 0), Vector3(1, 2, 0), Vector3(-1, 2, 0), Vector3(-1, -2, 0), 0.0f)); + tt.push_back(Case(Vector3(1, -2, 0), Vector3(1, 2, 0), Vector3(-1, 2, 0), Vector3(-1, -2, 0), 2.0f)); for (int i = 0; i < tt.size(); ++i) { Case current_case = tt[i]; float out = Geometry3D::get_closest_distance_between_segments(current_case.p_1, current_case.p_2, current_case.p_3, current_case.p_4); |