Removed constraints on ortographic projection function to allow bigger values for left, bottom, near than right, top, far.

This commit is contained in:
Darkspear7 2014-11-02 02:00:12 +02:00 committed by Dragos Blaj
parent 08c02bf04f
commit 7ae16b3423

View file

@ -215,10 +215,6 @@ impl<S: BaseFloat> Projection<S> for Ortho<S> {
impl<S: BaseFloat> ToMatrix4<S> for Ortho<S> {
fn to_matrix4(&self) -> Matrix4<S> {
assert!(self.left < self.right, "`left` cannot be greater than `right`, found: left: {} right: {}", self.left, self.right);
assert!(self.bottom < self.top, "`bottom` cannot be greater than `top`, found: bottom: {} top: {}", self.bottom, self.top);
assert!(self.near < self.far, "`near` cannot be greater than `far`, found: near: {} far: {}", self.near, self.far);
let two: S = cast(2i).unwrap();
let c0r0 = two / (self.right - self.left);