cannon.js icon indicating copy to clipboard operation
cannon.js copied to clipboard

Cleanup and improvement for fromVectors()

Open infusion opened this issue 2 years ago • 3 comments

Hi Stefan,

thanks for Cannon.js! As I am the author of Quaternion.js ( https://github.com/infusion/Quaternion.js ), I was interested in your implementation and figured, your fromVectors() method could be improved quite a bit. Besides this I added a note where the calculation for normalizeFast() comes from and removed the unused vectors used before for multiplication.

Hope this is helpful. Robert

infusion avatar Jul 18 '23 00:07 infusion

Is the project still alive?

infusion avatar Oct 07 '24 16:10 infusion

Is the project still alive?

Not exactly this repo, but I'm still using and updating the code for myself. I was actually wondering just some days ago how Quat#normalizeFast works and now this appeared in my issue list again because of your question :see_no_evil: Thank you!

kungfooman avatar Oct 17 '24 11:10 kungfooman

It should maybe not be called normalizeFast, but more like refineNormalization or something, since this also reflects the use case of having a normalized quat already that may need some adjustment

infusion avatar Oct 22 '24 14:10 infusion