summaryrefslogtreecommitdiff
path: root/mm/src/code/sys_math3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/src/code/sys_math3d.c')
-rw-r--r--mm/src/code/sys_math3d.c2
1 files changed, 2 insertions, 0 deletions
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) +