Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix QuaternionScale #2419

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Fix QuaternionScale #2419

merged 1 commit into from
Mar 30, 2022

Conversation

tana
Copy link
Contributor

@tana tana commented Mar 30, 2022

Description

This PR fixes calculation of QuaternionScale function in raymath.h.

Problem

I found the previous implementation of QuaternionScale was calculating (w+ix+jy+kz)(s+is+js+ks), rather than usual quaternion-scalar multiplication (w+ix+jy+kz)s.

Solution

Changed the function to calculate (w+ix+jy+kz)s = ws+i(xs)+j(ys)+k(zs).

(Sorry for hard-to-read math, because GitHub does not allow LaTeX equations)

@raysan5 raysan5 merged commit 5abb87a into raysan5:master Mar 30, 2022
@raysan5
Copy link
Owner

raysan5 commented Mar 30, 2022

@tana Thanks for the fix! I'm wondering what I was doing with that code and what was the intention of that function...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants