From 049b05fe3fa00ba217dcc1f67f0edb35e2bd48b0 Mon Sep 17 00:00:00 2001 From: kvark Date: Wed, 9 Oct 2013 04:35:51 -0400 Subject: [PATCH] Fixed projection.to_mat4 checks --- src/cgmath/projection.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cgmath/projection.rs b/src/cgmath/projection.rs index cd8f2d6..0ede2a1 100644 --- a/src/cgmath/projection.rs +++ b/src/cgmath/projection.rs @@ -104,12 +104,12 @@ impl> ToMat4 for PerspectiveFov { fn to_mat4(&self) -> Mat4 { let half_turn: A = Angle::turn_div_2(); - assert!(self.fovy < zero(), "The vertical field of view cannot be below zero, found: %?", self.fovy); - assert!(self.fovy > half_turn, "The vertical field of view cannot be greater than a half turn, found: %?", self.fovy); - assert!(self.aspect < zero(), "The aspect ratio cannot be below zero, found: %?", self.aspect); - assert!(self.near < zero(), "The near plane distance cannot be below zero, found: %?", self.near); - assert!(self.far < zero(), "The far plane distance cannot be below zero, found: %?", self.far); - assert!(self.far < self.near, "The far plane cannot be closer than the near plane, found: far: %?, near: %?", self.far, self.near); + assert!(self.fovy > zero(), "The vertical field of view cannot be below zero, found: %?", self.fovy); + assert!(self.fovy < half_turn, "The vertical field of view cannot be greater than a half turn, found: %?", self.fovy); + assert!(self.aspect > zero(), "The aspect ratio cannot be below zero, found: %?", self.aspect); + assert!(self.near > zero(), "The near plane distance cannot be below zero, found: %?", self.near); + assert!(self.far > zero(), "The far plane distance cannot be below zero, found: %?", self.far); + assert!(self.far > self.near, "The far plane cannot be closer than the near plane, found: far: %?, near: %?", self.far, self.near); let f = cot(self.fovy.div_s(cast(2))); let two: S = cast(2);