asik / FixedMath.Net

Fixed point math C# library
Other
591 stars 126 forks source link

Add precise Atan and Acos functions #13

Closed sam-vdp closed 6 years ago

sam-vdp commented 6 years ago

I noticed the Atan2 function is using a linear approximation. This PR adds Atan and Acos using a Euler series, which is more precise (and a lot slower of course).

sam-vdp commented 6 years ago

This will probably need a good amount of code review and fixing, please feel free to reject this if necessary. I think a small comment for the existing Atan mentioning the limitations would be helpful though.

asik commented 6 years ago

I'll look at it, sorry if it's taking time. A lot of what I mentioned in the other PR might also apply here so you could pre-emptively address that.

asik commented 6 years ago

LGTM except a few things I'll fix after. Please rebase and fix merge conflicts and I'll merge.

sam-vdp commented 6 years ago

Done

asik commented 6 years ago

Thank you for this contribution!