Clean up formatting

This commit is contained in:
Brendan Zabarauskas 2014-06-15 11:18:31 -07:00
parent b8996e124d
commit f7364ce42a

View file

@ -15,15 +15,12 @@
use std::{fmt, num};
use std::num::one;
use approx::ApproxEq;
use matrix::{Matrix, Matrix4, ToMatrix4};
use num::{BaseNum, BaseFloat};
use point::{Point, Point3};
use ray::Ray;
use rotation::{Rotation, Rotation3};
use quaternion::Quaternion;
use vector::{Vector, Vector3};
/// A trait representing an [affine
@ -129,8 +126,7 @@ impl<S: BaseFloat, V: Vector<S>, P: Point<S, V>, R: Rotation<S, V, P>> Transform
if self.scale.approx_eq(&num::zero()) {
None
} else {
let _1 : S = num::one();
let s = _1 / self.scale;
let s = num::one::<S>() / self.scale;
let r = self.rot.invert();
let d = r.rotate_vector(&self.disp).mul_s(-s);
Some(Decomposed {
@ -161,7 +157,6 @@ impl<S: BaseFloat, R: fmt::Show + Rotation3<S>> fmt::Show for Decomposed<S,Vecto
}
}
/// A homogeneous transformation matrix.
pub struct AffineMatrix3<S> {
pub mat: Matrix4<S>,