summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSatoshi Tanaka <[email protected]>2022-03-31 02:53:44 +0900
committerGitHub <[email protected]>2022-03-30 19:53:44 +0200
commit5abb87a0d27f3a81252c262dc217b0f8b85de753 (patch)
tree0a4949a91a3035e6d39c49e763af945dd2688ed4 /src
parent9c2d337e996b8c00ce0924675573766686b6d444 (diff)
downloadraylib-5abb87a0d27f3a81252c262dc217b0f8b85de753.tar.gz
raylib-5abb87a0d27f3a81252c262dc217b0f8b85de753.zip
Fix QuaternionScale (#2419)
Diffstat (limited to 'src')
-rw-r--r--src/raymath.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 319b7436..156e6638 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -1511,12 +1511,10 @@ RMAPI Quaternion QuaternionScale(Quaternion q, float mul)
{
Quaternion result = { 0 };
- float qax = q.x, qay = q.y, qaz = q.z, qaw = q.w;
-
- result.x = qax*mul + qaw*mul + qay*mul - qaz*mul;
- result.y = qay*mul + qaw*mul + qaz*mul - qax*mul;
- result.z = qaz*mul + qaw*mul + qax*mul - qay*mul;
- result.w = qaw*mul - qax*mul - qay*mul - qaz*mul;
+ result.x = q.x*mul;
+ result.y = q.y*mul;
+ result.z = q.z*mul;
+ result.w = q.w*mul;
return result;
}