-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Dual of 1 returns false #170
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks first off for this impressive library. It's been a joy playing around with it so far.
I found the gluLookAt example recently on observable and wanted to try it out on the actual camera used in a 3DPGA setup. I copied over the align function:
But noticed I was getting NaNs in the output multivectors. After digging around a bit, I realised that
!1
returns false, so P and Q aren't initialized to the pseudoscalar, as expected.The line in question seems to be:
So returning false seems to be the intended behaviour.
For now, I found a workaround by just using
Element.toEl(1).Dual
directly, but I wanted to raise this issue in case anyone else bumps into it. I'm not sure if it's possible to remove thetypeof a =='number'
check without unintended consequences, but it would be nice to have a consistent dual operation for 1, especially if we shouldn't use the pseudoscalar directly if it's degenerate?Thanks in advance!
The text was updated successfully, but these errors were encountered: