Some tweaks toEulerAnglesToRef()?

Hey, I was reading through math.vector.ts, and I think there are some minor improvements that could be made to toEulerAnglesToRef().

I noticed that zAxisY could be reused in place of “(qz * qy - qx * qw)”. Also the squaring can be done inside of the last else branch instead of at the top of the function since the other branches don’t use those numbers. Is it worth it to you for me to make a PR?

Always worth it, there are no unneeded perf improvments :slight_smile:

3 Likes