From d8612f4df64eea3f9ae952f6ed361c25ec16d383 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 21 Nov 2010 00:15:18 +0000 Subject: [PATCH] Relaxed parameter checks for CreatePerspectiveFieldOfView. Fixes issue [#1693]: "CreatePerspectiveFieldOfView throws in valid cases". --- Source/OpenTK/Math/Matrix4.cs | 2 -- Source/OpenTK/Math/Matrix4d.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/Source/OpenTK/Math/Matrix4.cs b/Source/OpenTK/Math/Matrix4.cs index 8eb5a484..009b658f 100644 --- a/Source/OpenTK/Math/Matrix4.cs +++ b/Source/OpenTK/Math/Matrix4.cs @@ -565,8 +565,6 @@ namespace OpenTK throw new ArgumentOutOfRangeException("zNear"); if (zFar <= 0) throw new ArgumentOutOfRangeException("zFar"); - if (zNear >= zFar) - throw new ArgumentOutOfRangeException("zNear"); float yMax = zNear * (float)System.Math.Tan(0.5f * fovy); float yMin = -yMax; diff --git a/Source/OpenTK/Math/Matrix4d.cs b/Source/OpenTK/Math/Matrix4d.cs index 95a7408f..1a1f810b 100644 --- a/Source/OpenTK/Math/Matrix4d.cs +++ b/Source/OpenTK/Math/Matrix4d.cs @@ -565,8 +565,6 @@ namespace OpenTK throw new ArgumentOutOfRangeException("zNear"); if (zFar <= 0) throw new ArgumentOutOfRangeException("zFar"); - if (zNear >= zFar) - throw new ArgumentOutOfRangeException("zNear"); double yMax = zNear * System.Math.Tan(0.5 * fovy); double yMin = -yMax;