Merge pull request #101 from RobotGymnast/master

Fix inverted asserts
This commit is contained in:
Brendan Zabarauskas 2014-07-24 13:33:09 +10:00
commit efbc3cbf02
2 changed files with 8 additions and 10 deletions

View file

@ -21,12 +21,8 @@ before_install:
- yes | sudo add-apt-repository ppa:cmrx64/cargo
- sudo apt-get update
install:
# cargo
- sudo apt-get install cargo
# rustc
- curl http://static.rust-lang.org/cargo-dist/cargo-nightly-linux.tar.gz |
sudo tar --strip-components 1 -C /usr -xzf -
- curl http://www.rust-lang.org/rustup.sh | sudo sh -
- wget http://www.rust-lang.org/rustup.sh
- sudo sh ./rustup.sh
- rustc -v
script:
- cargo build
@ -36,4 +32,6 @@ script:
- make clean
- make doc
after_script:
- curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh
- wget -O after_script.sh http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN
- chmod +x after_script.sh
- sh ./after_script.sh

View file

@ -159,9 +159,9 @@ impl<S: BaseFloat> Projection<S> for Perspective<S> {
impl<S: BaseFloat> ToMatrix4<S> for Perspective<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);
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();