From 05f86e2cc1f175b1b3f8371a23b8c6fb4207f515 Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Tue, 29 Mar 2022 17:56:02 +1100 Subject: [PATCH] fixed wrong degenerate direction checked in intersect.line_line_collide --- intersect.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intersect.lua b/intersect.lua index 8b4ca7c..b67c377 100644 --- a/intersect.lua +++ b/intersect.lua @@ -153,7 +153,7 @@ function intersect.line_line_collide(a_start, a_end, a_rad, b_start, b_end, b_ra --detect degenerate cases local a_degen = a_dir:length_squared() <= COLLIDE_EPS - local b_degen = a_dir:length_squared() <= COLLIDE_EPS + local b_degen = b_dir:length_squared() <= COLLIDE_EPS if a_degen or b_degen then vec2.release(a_dir, b_dir) if a_degen and b_degen then