Minor comments/formatting/imports cleanup
This commit is contained in:
parent
44ab57cb43
commit
c92771a2ae
3 changed files with 10 additions and 25 deletions
|
@ -1,7 +1,5 @@
|
|||
use std::cmp::FuzzyEq;
|
||||
use cmp::Eq;
|
||||
use ops::{Neg, Index};
|
||||
// use to_str::ToStr;
|
||||
use math::Sqrt;
|
||||
use quat::Quat;
|
||||
use vec::*;
|
||||
|
@ -47,7 +45,7 @@ pub trait Matrix3<V3> {
|
|||
// 4x4 Matrix
|
||||
//
|
||||
pub trait Matrix4<V3, V4> {
|
||||
pure fn scale(vec: &V3) -> self; // I don't like the use of `Vec3` here
|
||||
pure fn scale(vec: &V3) -> self;
|
||||
pure fn translate(vec: &V3) -> self;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
use std::cmp::FuzzyEq;
|
||||
use cmp::Eq;
|
||||
use ops::{Neg, Index};
|
||||
use to_str::ToStr;
|
||||
use math::Sqrt;
|
||||
use mat::{Mat3, Mat4};
|
||||
use vec::Vec3;
|
||||
|
||||
// TODO: Unittests
|
||||
|
||||
//
|
||||
// Quaternion
|
||||
//
|
||||
|
@ -204,9 +200,6 @@ pub impl Quat: FuzzyEq {
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Convert To String
|
||||
//
|
||||
pub impl Quat: ToStr {
|
||||
pure fn to_str() -> ~str {
|
||||
fmt!("Quat[ %f, %f, %f, %f ]", self.w, self.x, self.y, self.z)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::cmp::FuzzyEq;
|
||||
use cmp::Eq;
|
||||
use ops::{Neg, Index};
|
||||
use math::{Abs, abs, min, max, Sqrt};
|
||||
use to_str::ToStr;
|
||||
|
||||
//
|
||||
// N-dimensional Vector
|
||||
|
@ -234,10 +232,6 @@ pub impl Vec3: Vector3<float> {
|
|||
(self[2] * other[0]) - (self[0] * other[2]),
|
||||
(self[0] * other[1]) - (self[1] * other[0]))
|
||||
}
|
||||
|
||||
// #[inline] static pure fn unit_x() -> Vec3 { Vec3(1f, 0f, 0f) }
|
||||
// #[inline] static pure fn unit_y() -> Vec3 { Vec3(0f, 1f, 0f) }
|
||||
// #[inline] static pure fn unit_z() -> Vec3 { Vec3(0f, 0f, 1f) }
|
||||
}
|
||||
|
||||
pub impl Vec3: Vector<float> {
|
||||
|
|
Loading…
Reference in a new issue