From 1b14c082ed92db66a2fea40f415b506aefdab084 Mon Sep 17 00:00:00 2001 From: jtainer <92753845+jtainer@users.noreply.github.com> Date: Sat, 6 Apr 2024 07:56:20 -0400 Subject: [PATCH] Remove redundant axis length calculation (#3900) --- src/raymath.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/raymath.h b/src/raymath.h index 96f2c2cdd..3bafab510 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -2338,8 +2338,7 @@ RMAPI Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle) float ilength = 0.0f; // Vector3Normalize(axis) - Vector3 v = axis; - length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z); + length = axisLength; if (length == 0.0f) length = 1.0f; ilength = 1.0f/length; axis.x *= ilength;