Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GB_MATH_NO_MATH_H's gb_tan doesn't handle values over half PI #43

Open
jimon opened this issue Apr 11, 2020 · 0 comments
Open

GB_MATH_NO_MATH_H's gb_tan doesn't handle values over half PI #43

jimon opened this issue Apr 11, 2020 · 0 comments

Comments

@jimon
Copy link
Contributor

jimon commented Apr 11, 2020

By mistake I've passed 45.0f to gb_mat4_perspective and everything was looking fine.
But when I've enabled GB_MATH_NO_MATH_H suddenly nothing worked anymore.

Apparently tanf does some wrap arounds inside, and current emulation doesn't do that.
After some googling I found that original code is probably coming from some old DSP code ( for example this ) and then idlib math included it with some improvements here.

Not a problem for me, but would be nice to fix it at some point 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant