From 5df717fe6dfd9bd1b8b9cfdc126f4207685708af Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Tue, 23 Nov 2021 10:25:09 +1100 Subject: [PATCH] used mathx for clamp01 in intersect fixes #45 --- intersect.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intersect.lua b/intersect.lua index f77d7b5..f4ddf16 100644 --- a/intersect.lua +++ b/intersect.lua @@ -90,7 +90,7 @@ function intersect.nearest_point_on_line(a_start, a_end, b_pos, into) --solve for factor along segment local point_to_start = b_pos:pooled_copy() :vector_sub_inplace(a_start) - local factor = math.clamp01(point_to_start:dot(segment) / lensq) + local factor = mathx.clamp01(point_to_start:dot(segment) / lensq) point_to_start:release() into:set(segment) :scalar_mul_inplace(factor)