mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-23 04:22:09 +00:00
Added checks for possible height=0 crashes to GL target too.
This commit is contained in:
parent
4cf13bcdbf
commit
b1331433f7
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue