diff --git a/src/mat2.rs b/src/mat2.rs index b3c099a..5b45e31 100644 --- a/src/mat2.rs +++ b/src/mat2.rs @@ -394,7 +394,7 @@ pub impl Mat2: Neg> { pub impl Mat2: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Mat2) -> bool { + pure fn fuzzy_eq(&self, other: &Mat2) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) } diff --git a/src/mat3.rs b/src/mat3.rs index 6f0b9ba..f292d16 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -570,7 +570,7 @@ pub impl Mat3: Neg> { pub impl Mat3: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Mat3) -> bool { + pure fn fuzzy_eq(&self, other: &Mat3) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) && self[2].fuzzy_eq(&other[2]) diff --git a/src/mat4.rs b/src/mat4.rs index e587009..f51ae46 100644 --- a/src/mat4.rs +++ b/src/mat4.rs @@ -507,7 +507,7 @@ pub impl Mat4: Index> { pub impl Mat4: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Mat4) -> bool { + pure fn fuzzy_eq(&self, other: &Mat4) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) && self[2].fuzzy_eq(&other[2]) && diff --git a/src/quat.rs b/src/quat.rs index 640bb34..87f61e4 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -406,7 +406,7 @@ pub impl Quat: Neg> { pub impl Quat: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Quat) -> bool { + pure fn fuzzy_eq(&self, other: &Quat) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) && self[2].fuzzy_eq(&other[2]) && diff --git a/src/vec2.rs b/src/vec2.rs index de53dd2..65d1035 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -286,7 +286,7 @@ pub impl Vec2: MutableEuclideanVector<&self/T> { pub impl Vec2: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Vec2) -> bool { + pure fn fuzzy_eq(&self, other: &Vec2) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) } @@ -418,4 +418,16 @@ pub impl uvec2 { #[inline(always)] static pure fn dim() -> uint { 2 } #[inline(always)] static pure fn size_of() -> uint { size_of::() } -} \ No newline at end of file +} + +// Type aliases named in a more 'Rustic' style + +pub type vec2i = Vec2; +pub type vec2i8 = Vec2; +pub type vec2i16 = Vec2; +pub type vec2i32 = Vec2; +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 diff --git a/src/vec3.rs b/src/vec3.rs index 7caf032..9b1aa08 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -318,7 +318,7 @@ pub impl Vec3: MutableEuclideanVector<&self/T> { pub impl Vec3: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Vec3) -> bool { + pure fn fuzzy_eq(&self, other: &Vec3) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) && self[2].fuzzy_eq(&other[2]) diff --git a/src/vec4.rs b/src/vec4.rs index 9670c6c..5b5c1f2 100644 --- a/src/vec4.rs +++ b/src/vec4.rs @@ -316,7 +316,7 @@ pub impl Vec4: MutableEuclideanVector<&self/T> { pub impl Vec4: FuzzyEq { #[inline(always)] - pure fn fuzzy_eq(other: &Vec4) -> bool { + pure fn fuzzy_eq(&self, other: &Vec4) -> bool { self[0].fuzzy_eq(&other[0]) && self[1].fuzzy_eq(&other[1]) && self[2].fuzzy_eq(&other[2]) &&