From bb9f907691bfb1cb0bd7ba0c1dc56f74763ae5b9 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 25 Oct 2023 20:22:29 +0200 Subject: [PATCH] Math/Ray: Fix return 0 to return false --- include/Nazara/Math/Ray.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Nazara/Math/Ray.inl b/include/Nazara/Math/Ray.inl index f1daa7d00..412eb666b 100644 --- a/include/Nazara/Math/Ray.inl +++ b/include/Nazara/Math/Ray.inl @@ -421,12 +421,12 @@ namespace Nz Vector3 directionToPoint = origin - firstPoint; T u = directionToPoint.DotProduct(P) / divisor; if (u < T(0.0) || u > T(1.0)) - return 0; // The intersection lies outside of the triangle + return false; // The intersection lies outside of the triangle Vector3 Q = Vector3::CrossProduct(directionToPoint, firstEdge); T v = directionToPoint.DotProduct(Q) / divisor; if (v < T(0.0) || u + v > T(1.0)) - return 0; // The intersection lies outside of the triangle + return false; // The intersection lies outside of the triangle T t = secondEdge.DotProduct(Q) / divisor; if (t > T(0.0))