diff --git a/src/mat2.rs b/src/mat2.rs index bd7999c..1e25a02 100644 --- a/src/mat2.rs +++ b/src/mat2.rs @@ -46,7 +46,7 @@ use mat::{ #[deriving_eq] pub struct Mat2 { x: Vec2, y: Vec2 } -pub impl> Mat2: Matrix> { +pub impl> Matrix> for Mat2 { #[inline(always)] pure fn col(&self, i: uint) -> Vec2 { self[i] } @@ -208,7 +208,7 @@ pub impl> Mat2: Matrix> { } } -pub impl> Mat2: MutableMatrix> { +pub impl> MutableMatrix> for Mat2 { #[inline(always)] fn col_mut(&mut self, i: uint) -> &self/mut Vec2 { match i { @@ -278,7 +278,7 @@ pub impl> Mat2: MutableMatrix> { } } -pub impl> Mat2: Matrix2> { +pub impl> Matrix2> for Mat2 { /** * Construct a 2 x 2 matrix * @@ -379,7 +379,7 @@ pub impl> Mat2: Matrix2> { } } -pub impl Mat2: Index> { +pub impl Index> for Mat2 { #[inline(always)] pure fn index(&self, i: uint) -> Vec2 { unsafe { do buf_as_slice( @@ -389,14 +389,14 @@ pub impl Mat2: Index> { } } -pub impl> Mat2: Neg> { +pub impl> Neg> for Mat2 { #[inline(always)] pure fn neg(&self) -> Mat2 { Matrix2::from_cols(-self[0], -self[1]) } } -pub impl> Mat2: FuzzyEq { +pub impl> FuzzyEq for Mat2 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Mat2) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -421,7 +421,7 @@ pub impl mat2 { #[inline(always)] static pure fn new(c0r0: f32, c0r1: f32, c1r0: f32, c1r1: f32) -> mat2 { Matrix2::new(c0r0, c0r1, c1r0, c1r1) } #[inline(always)] static pure fn from_cols(c0: vec2, c1: vec2) - -> mat2 { Matrix2::from_cols(move c0, move c1) } + -> mat2 { Matrix2::from_cols(c0, c1) } #[inline(always)] static pure fn from_value(v: f32) -> mat2 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> mat2 { Matrix::identity() } @@ -439,7 +439,7 @@ pub impl dmat2 { #[inline(always)] static pure fn new(c0r0: f64, c0r1: f64, c1r0: f64, c1r1: f64) -> dmat2 { Matrix2::new(c0r0, c0r1, c1r0, c1r1) } #[inline(always)] static pure fn from_cols(c0: dvec2, c1: dvec2) - -> dmat2 { Matrix2::from_cols(move c0, move c1) } + -> dmat2 { Matrix2::from_cols(c0, c1) } #[inline(always)] static pure fn from_value(v: f64) -> dmat2 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> dmat2 { Matrix::identity() } @@ -451,4 +451,4 @@ pub impl dmat2 { #[inline(always)] static pure fn rows() -> uint { 2 } #[inline(always)] static pure fn cols() -> uint { 2 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +} diff --git a/src/mat3.rs b/src/mat3.rs index 5946ba6..d41e2af 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -48,7 +48,7 @@ use mat::{ #[deriving_eq] pub struct Mat3 { x: Vec3, y: Vec3, z: Vec3 } -pub impl> Mat3: Matrix> { +pub impl> Matrix> for Mat3 { #[inline(always)] pure fn col(&self, i: uint) -> Vec3 { self[i] } @@ -248,7 +248,7 @@ pub impl> Mat3: Matrix> { } } -pub impl> Mat3: Matrix3> { +pub impl> Matrix3> for Mat3 { /** * Construct a 3 x 3 matrix * @@ -475,7 +475,7 @@ pub impl> Mat3: Matrix3> { } } -pub impl> Mat3: MutableMatrix> { +pub impl> MutableMatrix> for Mat3 { #[inline(always)] fn col_mut(&mut self, i: uint) -> &self/mut Vec3 { match i { @@ -556,7 +556,7 @@ pub impl> Mat3: MutableMatrix> { } } -pub impl Mat3: Index> { +pub impl Index> for Mat3 { #[inline(always)] pure fn index(&self, i: uint) -> Vec3 { unsafe { do buf_as_slice( @@ -566,14 +566,14 @@ pub impl Mat3: Index> { } } -pub impl> Mat3: Neg> { +pub impl> Neg> for Mat3 { #[inline(always)] pure fn neg(&self) -> Mat3 { Matrix3::from_cols(-self[0], -self[1], -self[2]) } } -pub impl> Mat3: FuzzyEq { +pub impl> FuzzyEq for Mat3 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Mat3) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -599,7 +599,7 @@ pub impl mat3 { #[inline(always)] static pure fn new(c0r0: f32, c0r1: f32, c0r2: f32, c1r0: f32, c1r1: f32, c1r2: f32, c2r0: f32, c2r1: f32, c2r2: f32) -> mat3 { Matrix3::new(c0r0, c0r1, c0r2, c1r0, c1r1, c1r2, c2r0, c2r1, c2r2) } #[inline(always)] static pure fn from_cols(c0: vec3, c1: vec3, c2: vec3) - -> mat3 { Matrix3::from_cols(move c0, move c1, move c2) } + -> mat3 { Matrix3::from_cols(c0, c1, c2) } #[inline(always)] static pure fn from_value(v: f32) -> mat3 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> mat3 { Matrix::identity() } @@ -624,7 +624,7 @@ pub impl dmat3 { #[inline(always)] static pure fn new(c0r0: f64, c0r1: f64, c0r2: f64, c1r0: f64, c1r1: f64, c1r2: f64, c2r0: f64, c2r1: f64, c2r2: f64) -> dmat3 { Matrix3::new(c0r0, c0r1, c0r2, c1r0, c1r1, c1r2, c2r0, c2r1, c2r2) } #[inline(always)] static pure fn from_cols(c0: dvec3, c1: dvec3, c2: dvec3) - -> dmat3 { Matrix3::from_cols(move c0, move c1, move c2) } + -> dmat3 { Matrix3::from_cols(c0, c1, c2) } #[inline(always)] static pure fn from_value(v: f64) -> dmat3 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> dmat3 { Matrix::identity() } @@ -634,4 +634,4 @@ pub impl dmat3 { #[inline(always)] static pure fn rows() -> uint { 3 } #[inline(always)] static pure fn cols() -> uint { 3 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +} diff --git a/src/mat4.rs b/src/mat4.rs index d78f64d..7bca0e1 100644 --- a/src/mat4.rs +++ b/src/mat4.rs @@ -45,7 +45,7 @@ use mat::{ #[deriving_eq] pub struct Mat4 { x: Vec4, y: Vec4, z: Vec4, w: Vec4 } -pub impl> Mat4: Matrix> { +pub impl> Matrix> for Mat4 { #[inline(always)] pure fn col(&self, i: uint) -> Vec4 { self[i] } @@ -332,7 +332,7 @@ pub impl> Mat4: Matrix> { } } -pub impl> Mat4: Matrix4> { +pub impl> Matrix4> for Mat4 { /** * Construct a 4 x 4 matrix * @@ -399,7 +399,7 @@ pub impl> Mat4: Matrix4> { } } -pub impl> Mat4: MutableMatrix> { +pub impl> MutableMatrix> for Mat4 { #[inline(always)] fn col_mut(&mut self, i: uint) -> &self/mut Vec4 { match i { @@ -492,14 +492,14 @@ pub impl> Mat4: MutableMatrix> { } } -pub impl> Mat4: Neg> { +pub impl> Neg> for Mat4 { #[inline(always)] pure fn neg(&self) -> Mat4 { Matrix4::from_cols(-self[0], -self[1], -self[2], -self[3]) } } -pub impl Mat4: Index> { +pub impl Index> for Mat4 { #[inline(always)] pure fn index(&self, i: uint) -> Vec4 { unsafe { do buf_as_slice( @@ -509,7 +509,7 @@ pub impl Mat4: Index> { } } -pub impl> Mat4: FuzzyEq { +pub impl> FuzzyEq for Mat4 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Mat4) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -536,7 +536,7 @@ pub impl mat4 { #[inline(always)] static pure fn new(c0r0: f32, c0r1: f32, c0r2: f32, c0r3: f32, c1r0: f32, c1r1: f32, c1r2: f32, c1r3: f32, c2r0: f32, c2r1: f32, c2r2: f32, c2r3: f32, c3r0: f32, c3r1: f32, c3r2: f32, c3r3: f32) -> mat4 { Matrix4::new(c0r0, c0r1, c0r2, c0r3, c1r0, c1r1, c1r2, c1r3, c2r0, c2r1, c2r2, c2r3, c3r0, c3r1, c3r2, c3r3) } #[inline(always)] static pure fn from_cols(c0: vec4, c1: vec4, c2: vec4, c3: vec4) - -> mat4 { Matrix4::from_cols(move c0, move c1, move c2, move c3) } + -> mat4 { Matrix4::from_cols(c0, c1, c2, c3) } #[inline(always)] static pure fn from_value(v: f32) -> mat4 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> mat4 { Matrix::identity() } @@ -552,7 +552,7 @@ pub impl dmat4 { #[inline(always)] static pure fn new(c0r0: f64, c0r1: f64, c0r2: f64, c0r3: f64, c1r0: f64, c1r1: f64, c1r2: f64, c1r3: f64, c2r0: f64, c2r1: f64, c2r2: f64, c2r3: f64, c3r0: f64, c3r1: f64, c3r2: f64, c3r3: f64) -> dmat4 { Matrix4::new(c0r0, c0r1, c0r2, c0r3, c1r0, c1r1, c1r2, c1r3, c2r0, c2r1, c2r2, c2r3, c3r0, c3r1, c3r2, c3r3) } #[inline(always)] static pure fn from_cols(c0: dvec4, c1: dvec4, c2: dvec4, c3: dvec4) - -> dmat4 { Matrix4::from_cols(move c0, move c1, move c2, move c3) } + -> dmat4 { Matrix4::from_cols(c0, c1, c2, c3) } #[inline(always)] static pure fn from_value(v: f64) -> dmat4 { Matrix::from_value(v) } #[inline(always)] static pure fn identity() -> dmat4 { Matrix::identity() } @@ -562,4 +562,4 @@ pub impl dmat4 { #[inline(always)] static pure fn rows() -> uint { 4 } #[inline(always)] static pure fn cols() -> uint { 4 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +} diff --git a/src/quat.rs b/src/quat.rs index 9cb4e80..171504e 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -390,7 +390,7 @@ pub impl> Quat { } } -pub impl Quat: Index { +pub impl Index for Quat { #[inline(always)] pure fn index(&self, i: uint) -> T { unsafe { do buf_as_slice( @@ -400,14 +400,14 @@ pub impl Quat: Index { } } -pub impl> Quat: Neg> { +pub impl> Neg> for Quat { #[inline(always)] pure fn neg(&self) -> Quat { Quat::new(-self[0], -self[1], -self[2], -self[3]) } } -pub impl> Quat: FuzzyEq { +pub impl> FuzzyEq for Quat { #[inline(always)] pure fn fuzzy_eq(&self, other: &Quat) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -460,4 +460,4 @@ pub impl dquat { #[inline(always)] static pure fn from_angle_axis(radians: f64, axis: &dvec3) -> dquat { Quat::from_angle_axis(radians, axis) } #[inline(always)] static pure fn from_axes(x: dvec3, y: dvec3, z: dvec3) -> dquat { Quat::from_axes(x, y, z) } #[inline(always)] static pure fn look_at(dir: &dvec3, up: &dvec3) -> dquat { Quat::look_at(dir, up) } -} \ No newline at end of file +} diff --git a/src/vec2.rs b/src/vec2.rs index 39125e7..33fd66d 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -43,7 +43,7 @@ use vec::{ #[deriving_eq] pub struct Vec2 { x: T, y: T } -pub impl Vec2: Vector { +pub impl Vector for Vec2 { #[inline(always)] static pure fn from_value(value: T) -> Vec2 { Vector2::new(value, value) @@ -59,21 +59,21 @@ pub impl Vec2: Vector { } } -pub impl Vec2: Vector2 { +pub impl Vector2 for Vec2 { #[inline(always)] static pure fn new(x: T, y: T ) -> Vec2 { Vec2 { x: x, y: y } } } -pub impl Vec2: Index { +pub impl Index for Vec2 { #[inline(always)] pure fn index(&self, i: uint) -> T { unsafe { do buf_as_slice(self.to_ptr(), 2) |slice| { slice[i] } } } } -pub impl Vec2: MutableVector { +pub impl MutableVector for Vec2 { #[inline(always)] fn index_mut(&mut self, i: uint) -> &self/mut T { match i { @@ -90,7 +90,7 @@ pub impl Vec2: MutableVector { } } -pub impl Vec2: NumericVector { +pub impl NumericVector for Vec2 { #[inline(always)] static pure fn identity() -> Vec2 { Vector2::new(one::(), one::()) @@ -150,14 +150,14 @@ pub impl Vec2: NumericVector { } } -pub impl Vec2: Neg> { +pub impl Neg> for Vec2 { #[inline(always)] pure fn neg(&self) -> Vec2 { Vector2::new(-self[0], -self[1]) } } -pub impl Vec2: NumericVector2 { +pub impl NumericVector2 for Vec2 { #[inline(always)] static pure fn unit_x() -> Vec2 { Vector2::new(one::(), zero::()) @@ -174,7 +174,7 @@ pub impl Vec2: NumericVector2 { } } -pub impl Vec2: MutableNumericVector<&self/T> { +pub impl MutableNumericVector<&self/T> for Vec2 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -218,14 +218,14 @@ pub impl Vec2: MutableNumericVector<&self/T> { } } -pub impl Vec2: ToHomogeneous> { +pub impl ToHomogeneous> for Vec2 { #[inline(always)] pure fn to_homogeneous(&self) -> Vec3 { Vector3::new(self.x, self.y, zero()) } } -pub impl Vec2: EuclideanVector { +pub impl EuclideanVector for Vec2 { #[inline(always)] pure fn length2(&self) -> T { self.dot(self) @@ -267,7 +267,7 @@ pub impl Vec2: EuclideanVector { } } -pub impl Vec2: MutableEuclideanVector<&self/T> { +pub impl MutableEuclideanVector<&self/T> for Vec2 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length(); @@ -285,7 +285,7 @@ pub impl Vec2: MutableEuclideanVector<&self/T> { } } -pub impl> Vec2: FuzzyEq { +pub impl> FuzzyEq for Vec2 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Vec2) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -298,7 +298,7 @@ pub impl> Vec2: FuzzyEq { } } -pub impl Vec2: OrdinalVector> { +pub impl OrdinalVector> for Vec2 { #[inline(always)] pure fn less_than(&self, other: &Vec2) -> Vec2 { Vector2::new(self[0] < other[0], @@ -324,7 +324,7 @@ pub impl Vec2: OrdinalVector> { } } -pub impl Vec2: EquableVector> { +pub impl EquableVector> for Vec2 { #[inline(always)] pure fn equal(&self, other: &Vec2) -> Vec2 { Vector2::new(self[0] == other[0], @@ -338,7 +338,7 @@ pub impl Vec2: EquableVector> { } } -pub impl Vec2: BooleanVector { +pub impl BooleanVector for Vec2 { #[inline(always)] pure fn any(&self) -> bool { self[0] || self[1] @@ -436,4 +436,4 @@ pub type vec2i64 = Vec2; pub type vec2f = Vec2; pub type vec2f32 = Vec2; pub type vec2f64 = Vec2; -pub type vec2b = Vec2; \ No newline at end of file +pub type vec2b = Vec2; diff --git a/src/vec3.rs b/src/vec3.rs index e2b962b..c4fa7ed 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -45,7 +45,7 @@ use vec::{ #[deriving_eq] pub struct Vec3 { x: T, y: T, z: T } -pub impl Vec3: Vector { +pub impl Vector for Vec3 { #[inline(always)] static pure fn from_value(value: T) -> Vec3 { Vector3::new(value, value, value) @@ -61,21 +61,21 @@ pub impl Vec3: Vector { } } -pub impl Vec3: Vector3 { +pub impl Vector3 for Vec3 { #[inline(always)] static pure fn new(x: T, y: T, z: T) -> Vec3 { Vec3 { x: x, y: y, z: z } } } -pub impl Vec3: Index { +pub impl Index for Vec3 { #[inline(always)] pure fn index(&self, i: uint) -> T { unsafe { do buf_as_slice(self.to_ptr(), 3) |slice| { slice[i] } } } } -pub impl Vec3: MutableVector { +pub impl MutableVector for Vec3 { #[inline(always)] fn index_mut(&mut self, i: uint) -> &self/mut T { match i { @@ -93,7 +93,7 @@ pub impl Vec3: MutableVector { } } -pub impl Vec3: NumericVector { +pub impl NumericVector for Vec3 { #[inline(always)] static pure fn identity() -> Vec3 { Vector3::new(one::(), one::(), one::()) @@ -161,14 +161,14 @@ pub impl Vec3: NumericVector { } } -pub impl Vec3: Neg> { +pub impl Neg> for Vec3 { #[inline(always)] pure fn neg(&self) -> Vec3 { Vector3::new(-self[0], -self[1], -self[2]) } } -pub impl Vec3: NumericVector3 { +pub impl NumericVector3 for Vec3 { #[inline(always)] static pure fn unit_x() -> Vec3 { Vector3::new(one::(), zero::(), zero::()) @@ -192,7 +192,7 @@ pub impl Vec3: NumericVector3 { } } -pub impl Vec3: MutableNumericVector<&self/T> { +pub impl MutableNumericVector<&self/T> for Vec3 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -243,21 +243,21 @@ pub impl Vec3: MutableNumericVector<&self/T> { } } -pub impl Vec3: MutableNumericVector3<&self/T> { +pub impl MutableNumericVector3<&self/T> for Vec3 { #[inline(always)] fn cross_self(&mut self, other: &Vec3) { *self = self.cross(other); } } -pub impl Vec3: ToHomogeneous> { +pub impl ToHomogeneous> for Vec3 { #[inline(always)] pure fn to_homogeneous(&self) -> Vec4 { Vector4::new(self.x, self.y, self.z, zero()) } } -pub impl Vec3: EuclideanVector { +pub impl EuclideanVector for Vec3 { #[inline(always)] pure fn length2(&self) -> T { self.dot(self) @@ -299,7 +299,7 @@ pub impl Vec3: EuclideanVector { } } -pub impl Vec3: MutableEuclideanVector<&self/T> { +pub impl MutableEuclideanVector<&self/T> for Vec3 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length(); @@ -317,7 +317,7 @@ pub impl Vec3: MutableEuclideanVector<&self/T> { } } -pub impl> Vec3: FuzzyEq { +pub impl> FuzzyEq for Vec3 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Vec3) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -331,7 +331,7 @@ pub impl> Vec3: FuzzyEq { } } -pub impl Vec3: OrdinalVector> { +pub impl OrdinalVector> for Vec3 { #[inline(always)] pure fn less_than(&self, other: &Vec3) -> Vec3 { Vector3::new(self[0] < other[0], @@ -361,7 +361,7 @@ pub impl Vec3: OrdinalVector> { } } -pub impl Vec3: EquableVector> { +pub impl EquableVector> for Vec3 { #[inline(always)] pure fn equal(&self, other: &Vec3) -> Vec3 { Vector3::new(self[0] == other[0], @@ -377,7 +377,7 @@ pub impl Vec3: EquableVector> { } } -pub impl Vec3: BooleanVector { +pub impl BooleanVector for Vec3 { #[inline(always)] pure fn any(&self) -> bool { self[0] || self[1] || self[2] @@ -467,4 +467,4 @@ pub impl uvec3 { #[inline(always)] static pure fn dim() -> uint { 3 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +} diff --git a/src/vec4.rs b/src/vec4.rs index 7a545b7..55c1a58 100644 --- a/src/vec4.rs +++ b/src/vec4.rs @@ -43,7 +43,7 @@ use vec::{ #[deriving_eq] pub struct Vec4 { x: T, y: T, z: T, w: T } -pub impl Vec4: Vector { +pub impl Vector for Vec4 { #[inline(always)] static pure fn from_value(value: T) -> Vec4 { Vector4::new(value, value, value, value) @@ -59,21 +59,21 @@ pub impl Vec4: Vector { } } -pub impl Vec4: Vector4 { +pub impl Vector4 for Vec4 { #[inline(always)] static pure fn new(x: T, y: T, z: T, w: T) -> Vec4 { Vec4 { x: x, y: y, z: z, w: w } } } -pub impl Vec4: Index { +pub impl Index for Vec4 { #[inline(always)] pure fn index(&self, i: uint) -> T { unsafe { do buf_as_slice(self.to_ptr(), 4) |slice| { slice[i] } } } } -pub impl Vec4: MutableVector { +pub impl MutableVector for Vec4 { #[inline(always)] fn index_mut(&mut self, i: uint) -> &self/mut T { match i { @@ -92,7 +92,7 @@ pub impl Vec4: MutableVector { } } -pub impl Vec4: NumericVector { +pub impl NumericVector for Vec4 { #[inline(always)] static pure fn identity() -> Vec4 { Vector4::new(one::(), one::(), one::(), one::()) @@ -168,14 +168,14 @@ pub impl Vec4: NumericVector { } } -pub impl Vec4: Neg> { +pub impl Neg> for Vec4 { #[inline(always)] pure fn neg(&self) -> Vec4 { Vector4::new(-self[0], -self[1], -self[2], -self[3]) } } -pub impl Vec4: NumericVector4 { +pub impl NumericVector4 for Vec4 { #[inline(always)] static pure fn unit_x() -> Vec4 { Vector4::new(one::(), zero::(), zero::(), zero::()) @@ -197,7 +197,7 @@ pub impl Vec4: NumericVector4 { } } -pub impl Vec4: MutableNumericVector<&self/T> { +pub impl MutableNumericVector<&self/T> for Vec4 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -255,7 +255,7 @@ pub impl Vec4: MutableNumericVector<&self/T> { } } -pub impl Vec4: EuclideanVector { +pub impl EuclideanVector for Vec4 { #[inline(always)] pure fn length2(&self) -> T { self.dot(self) @@ -297,7 +297,7 @@ pub impl Vec4: EuclideanVector { } } -pub impl Vec4: MutableEuclideanVector<&self/T> { +pub impl MutableEuclideanVector<&self/T> for Vec4 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length(); @@ -315,7 +315,7 @@ pub impl Vec4: MutableEuclideanVector<&self/T> { } } -pub impl> Vec4: FuzzyEq { +pub impl> FuzzyEq for Vec4 { #[inline(always)] pure fn fuzzy_eq(&self, other: &Vec4) -> bool { self.fuzzy_eq_eps(other, &Number::from(FUZZY_EPSILON)) @@ -330,7 +330,7 @@ pub impl> Vec4: FuzzyEq { } } -pub impl Vec4: OrdinalVector> { +pub impl OrdinalVector> for Vec4 { #[inline(always)] pure fn less_than(&self, other: &Vec4) -> Vec4 { Vector4::new(self[0] < other[0], @@ -364,7 +364,7 @@ pub impl Vec4: OrdinalVector> { } } -pub impl Vec4: EquableVector> { +pub impl EquableVector> for Vec4 { #[inline(always)] pure fn equal(&self, other: &Vec4) -> Vec4 { Vector4::new(self[0] == other[0], @@ -382,7 +382,7 @@ pub impl Vec4: EquableVector> { } } -pub impl Vec4: BooleanVector { +pub impl BooleanVector for Vec4 { #[inline(always)] pure fn any(&self) -> bool { self[0] || self[1] || self[2] || self[3] @@ -477,4 +477,4 @@ pub impl uvec4 { #[inline(always)] static pure fn dim() -> uint { 4 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +}