mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 18:55:35 +00:00
Relaxed parameter checks for CreatePerspectiveFieldOfView. Fixes issue [#1693]: "CreatePerspectiveFieldOfView throws in valid cases".
This commit is contained in:
parent
4be74af5d4
commit
d8612f4df6
|
@ -565,8 +565,6 @@ namespace OpenTK
|
||||||
throw new ArgumentOutOfRangeException("zNear");
|
throw new ArgumentOutOfRangeException("zNear");
|
||||||
if (zFar <= 0)
|
if (zFar <= 0)
|
||||||
throw new ArgumentOutOfRangeException("zFar");
|
throw new ArgumentOutOfRangeException("zFar");
|
||||||
if (zNear >= zFar)
|
|
||||||
throw new ArgumentOutOfRangeException("zNear");
|
|
||||||
|
|
||||||
float yMax = zNear * (float)System.Math.Tan(0.5f * fovy);
|
float yMax = zNear * (float)System.Math.Tan(0.5f * fovy);
|
||||||
float yMin = -yMax;
|
float yMin = -yMax;
|
||||||
|
|
|
@ -565,8 +565,6 @@ namespace OpenTK
|
||||||
throw new ArgumentOutOfRangeException("zNear");
|
throw new ArgumentOutOfRangeException("zNear");
|
||||||
if (zFar <= 0)
|
if (zFar <= 0)
|
||||||
throw new ArgumentOutOfRangeException("zFar");
|
throw new ArgumentOutOfRangeException("zFar");
|
||||||
if (zNear >= zFar)
|
|
||||||
throw new ArgumentOutOfRangeException("zNear");
|
|
||||||
|
|
||||||
double yMax = zNear * System.Math.Tan(0.5 * fovy);
|
double yMax = zNear * System.Math.Tan(0.5 * fovy);
|
||||||
double yMin = -yMax;
|
double yMin = -yMax;
|
||||||
|
|
Loading…
Reference in a new issue