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 Quaternion biAlign #1094

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Fix Quaternion biAlign #1094

merged 4 commits into from
Jul 3, 2024

Conversation

AxisAngles
Copy link
Contributor

Fixed biAlign. (Syntax check and formatting needed)

Added: Safety unitization in case of non unit axes.
Fixed: Found bQ was evaluated as "a.dot(Q.xyz)" instead of "b.dot(Q.xyz)"
Fixed: abQ was missing term "- a.dot(b)*rot.w"
Fixed: angleA was maximizing error instead of minimizing
Fixed: angleB was not consistently giving a value between -pi and pi

I came back to this code to use it for some research, and turns out there were some severe mistakes or typos. This is re-derived from the ground up and the lua version is tested a fair bit. This is a translation of Lua to Kotlin, so there might be some syntax errors, but the math is correct now.

Fixed biAlign. (Syntax check and formatting needed)

Added: Safety unitization in case of non unit axes.
Fixed: Found bQ was evaluated as "a.dot(Q.xyz)" instead of "b.dot(Q.xyz)"
Fixed: abQ was missing term "- a.dot(b)*rot.w"
Fixed: angleA was maximizing error instead of minimizing
Fixed: angleB was not consistently giving a value between -pi and pi

I came back to this code to use it for some research, and turns out there were some severe mistakes or typos. This is re-derived from the ground up and the lua version is tested a fair bit. This is a translation of Lua to Kotlin, so there might be some syntax errors, but the math is correct now.
Attempt to appease the formatter
@AxisAngles AxisAngles changed the title Fix Quaternion biAlign Fix Quaternion biAlign pt2 Jun 25, 2024
@AxisAngles AxisAngles changed the title Fix Quaternion biAlign pt2 Fix Quaternion biAlign Jun 25, 2024
@AxisAngles AxisAngles marked this pull request as ready for review June 25, 2024 14:51
@ImUrX ImUrX merged commit 708135f into main Jul 3, 2024
8 checks passed
@ImUrX ImUrX deleted the AxisAngles-patch-1 branch July 3, 2024 14:23
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.

3 participants