fogleman/Craft

Matrix.h conversion from degrees to radians

mmhanson opened this issue · 1 comments

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);

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