JOML-CI / JOML

A Java math library for OpenGL rendering calculations
MIT License
728 stars 104 forks source link

Math.atan2 used in Quaternion.slerp() is slow #261

Closed lukehutch closed 4 years ago

lukehutch commented 4 years ago

I have an application that does a lot of Quaterniond.slerp() operations. I couldn't figure out why it was so slow, so I profiled it:

image

I had no idea Math.atan2() was so slow.

Is there a possibility of switching to a fast approximation?

https://math.stackexchange.com/questions/1098487/atan2-faster-approximation

httpdigest commented 4 years ago

Is there a reason why you created two identical issues and closed only one of the? https://github.com/JOML-CI/JOML/issues/262

lukehutch commented 4 years ago

No, I definitely only created one issue. This must have been a GitHub hiccup, or the browser submitted the form twice for some reason. Sorry about that.