Added checks for possible height=0 crashes to GL target too.

This commit is contained in:
Danne 2000-05-19 14:41:10 +00:00
parent 4cf13bcdbf
commit b1331433f7

View file

@ -305,7 +305,7 @@ float CalcFov (float fov_x, float width, float height)
x = width/tan(fov_x/360*M_PI); x = width/tan(fov_x/360*M_PI);
a = atan (height/x); a = (x == 0) ? 90 : atan(height/x); // 0 shouldn't happen
a = a*360/M_PI; a = a*360/M_PI;