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

Matrix.h conversion from degrees to radians #237

Open
mmhanson opened this issue Dec 5, 2019 · 1 comment
Open

Matrix.h conversion from degrees to radians #237

mmhanson opened this issue Dec 5, 2019 · 1 comment

Comments

@mmhanson
Copy link

mmhanson commented Dec 5, 2019

I'm reading through this project to help with my own OpenGL project and I noticed line 180 of matrix.c:

ymax = znear * tanf(fov * PI / 360.0);

Is fov in degrees? If so the correct way to convert it to radians would be:

ymax = znear * tanf(fov * PI / 180.0);

@jtlehtinen
Copy link

Yes, FOV is in degrees. The argument passed to tanf is half of the FOV.

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

2 participants