diff options
| author | Satoshi Tanaka <[email protected]> | 2022-03-31 02:53:44 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-30 19:53:44 +0200 |
| commit | 5abb87a0d27f3a81252c262dc217b0f8b85de753 (patch) | |
| tree | 0a4949a91a3035e6d39c49e763af945dd2688ed4 /src | |
| parent | 9c2d337e996b8c00ce0924675573766686b6d444 (diff) | |
| download | raylib-5abb87a0d27f3a81252c262dc217b0f8b85de753.tar.gz raylib-5abb87a0d27f3a81252c262dc217b0f8b85de753.zip | |
Fix QuaternionScale (#2419)
Diffstat (limited to 'src')
| -rw-r--r-- | src/raymath.h | 10 |
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; } |
