From 2b8bfcaa3e9ef55f5fc1fba01894a569a4b5c7af Mon Sep 17 00:00:00 2001 From: Liam Swayne Date: Tue, 16 Apr 2024 17:50:32 -0400 Subject: [PATCH] [math] simplify algorithm finding greatest vector --- src/math/ray.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/math/ray.zig b/src/math/ray.zig index 83b3c104..4d516e63 100644 --- a/src/math/ray.zig +++ b/src/math/ray.zig @@ -47,10 +47,9 @@ pub fn Ray(comptime Vec3P: type) type { } } else if (v[1] > v[2]) { return 1; - } else if (v[2] > v[0]) { + } else { return 2; } - return 0; } // Algorithm based on: