From e2dc6a3fc70a79bb36de0cdaf1e57485e2d7f042 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sat, 25 May 2024 15:53:55 +0100 Subject: @bug sweep (#449) * bug sweep round 1 * player anim frame bug already handled * format * stick tex and div by 0 * deku stick n64 and nicer swlift fix --- mm/src/code/sys_math3d.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mm/src/code') diff --git a/mm/src/code/sys_math3d.c b/mm/src/code/sys_math3d.c index 3710c1e1e..565dcd463 100644 --- a/mm/src/code/sys_math3d.c +++ b/mm/src/code/sys_math3d.c @@ -133,6 +133,8 @@ f32 Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoin if (IS_ZERO(dirMagnitudeSq)) { Math_Vec3f_Copy(closestPoint, pos); //! @bug Missing early return + // 2S2H [Port] - return early to avoid div by 0! + return 0.0f; } t = (((pos->x - line->point.x) * line->dir.x) + ((pos->y - line->point.y) * line->dir.y) + -- cgit v1.2.3