You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
I would expect the last two print statments to mostly agree but they do not, e.g.
quad: -0.3830223083496094, -0.3213938772678375, -0.6634140610694885 @ -0.5566705465316772
Direction from quad: [0.9848082065582275,-0.1736481785774231,-4.0803353584806246e-8]
Direction from rot: [-0.49240386486053467,-0.17364810407161713,0.8528685569763184]
There also seems to be no test for this in the test suite
It could be that I am merely misunderstanding the API instead of
dir.rotate(x);
using
x.applyQuaternion(dir);
seems to work.
If that is indeed the case, maybe the documentation could be updated.
I also have a related feature request: quaternion multiplication always forces a allocation.
It would be nice tio have a version that multiplies into a given (empty) quaternion.
Could you add a little more "prose" to the answer - people that look at this in a couple of years will be thankful.
E.g.:
Why do you have to normalize? Is this a well known math fact? If so, provide a link.
Or maybe this is only necessary for a certain class of Quaternions. If so, how can one tell?
Also, what is the recommended course of action: do nothing, add the normalization step to the library, add a warning to the library documentation.
Activity
robertmuth commentedon Jun 5, 2024
It could be that I am merely misunderstanding the API instead of
dir.rotate(x);
using
x.applyQuaternion(dir);
seems to work.
If that is indeed the case, maybe the documentation could be updated.
I also have a related feature request: quaternion multiplication always forces a allocation.
It would be nice tio have a version that multiplies into a given (empty) quaternion.
notakshitgoyal commentedon Dec 1, 2024
robertmuth commentedon Dec 1, 2024
Could you add a little more "prose" to the answer - people that look at this in a couple of years will be thankful.
E.g.:
Why do you have to normalize? Is this a well known math fact? If so, provide a link.
Or maybe this is only necessary for a certain class of Quaternions. If so, how can one tell?
Also, what is the recommended course of action: do nothing, add the normalization step to the library, add a warning to the library documentation.
stuartmorgan-g commentedon Jun 3, 2026
This package has moved to https://github.com/flutter/core-packages, so if this issue is still relevant please re-file it in https://github.com/flutter/flutter. Thanks!