-
Notifications
You must be signed in to change notification settings - Fork 75
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
axis for unit quaterion given as (0, 0, 0) #86
Comments
The |
Yes, I have done a similar workaround, but it did not seem very clean :).
I also think the returning of nan values would be a good option.
…On Wed, Jun 26, 2024 at 8:36 AM Teodor Cioaca ***@***.***> wrote:
The [0,0,0] is indeed not a unit vector. The axis is thus undetermined.
Perhaps it would be best to indicate this situation through nan values
instead of zeros and leave it up to the user of the library to indicate how
they wish to proceed further. Another option would be through a special
policy, e.g. offering a class property of the Quaernion class that users
can override to their wishes, a property that could be named
UndeterminedAxis or similar. By default, that could return nans instead
of zeros, but the whole idea would be to have users configure the behavior.
I also treated such an edge case a while ago by simply choosing 1,0,0 as
an axis with no other consequence on my algorithm, but that is not a
mathematically generally correct or without consequences. Thus, users
should know that by default they will encounters nan values, but they can
choose to tune the behavior if they really need a specific workaround and
do not want to handle nans explicitly.
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZAB7JPQDEBH2U2R4D3HHDZJJON7AVCNFSM6AAAAABJ3LBE6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQHEYTMNBYHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi
I noticed that the axis of the unit quaternion (1,0,0,0) is returned as (0,0,0).
This code
produces this output:
I think this behavior is not correct.
Of course, for an angle of 0 the axis is arbitrary, but it should not be [0,0,0]
The text was updated successfully, but these errors were encountered: