diff --git a/src/angle.rs b/src/angle.rs index 1ed9a63..748ba0b 100644 --- a/src/angle.rs +++ b/src/angle.rs @@ -55,49 +55,49 @@ pub impl Radians: Add, Radians> { pub impl Radians: Sub, Radians> { #[inline(always)] - pure fn sub(rhs: &Radians) -> Radians { - Radians(*self - **rhs) + pure fn sub(&self, rhs: &Radians) -> Radians { + Radians(**self - **rhs) } } pub impl Radians: Mul> { #[inline(always)] - pure fn mul(rhs: &T) -> Radians { - Radians(*self * *rhs) + pure fn mul(&self, rhs: &T) -> Radians { + Radians(**self * *rhs) } } pub impl Radians: Div> { #[inline(always)] - pure fn div(rhs: &T) -> Radians { - Radians(*self / *rhs) + pure fn div(&self, rhs: &T) -> Radians { + Radians(**self / *rhs) } } pub impl Radians: Modulo> { #[inline(always)] - pure fn modulo(rhs: &T) -> Radians { - Radians(*self % *rhs) + pure fn modulo(&self, rhs: &T) -> Radians { + Radians(**self % *rhs) } } pub impl Radians: Neg> { #[inline(always)] - pure fn neg() -> Radians { - Radians(-*self) + pure fn neg(&self) -> Radians { + Radians(-**self) } } pub impl Radians: Eq { - #[inline(always)] pure fn eq(other: &Radians) -> bool { *self == **other } - #[inline(always)] pure fn ne(other: &Radians) -> bool { *self != **other } + #[inline(always)] pure fn eq(&self, other: &Radians) -> bool { **self == **other } + #[inline(always)] pure fn ne(&self, other: &Radians) -> bool { **self != **other } } pub impl Radians: Ord { - #[inline(always)] pure fn lt(other: &Radians) -> bool { *self < **other } - #[inline(always)] pure fn le(other: &Radians) -> bool { *self <= **other } - #[inline(always)] pure fn ge(other: &Radians) -> bool { *self >= **other } - #[inline(always)] pure fn gt(other: &Radians) -> bool { *self > **other } + #[inline(always)] pure fn lt(&self, other: &Radians) -> bool { **self < **other } + #[inline(always)] pure fn le(&self, other: &Radians) -> bool { **self <= **other } + #[inline(always)] pure fn ge(&self, other: &Radians) -> bool { **self >= **other } + #[inline(always)] pure fn gt(&self, other: &Radians) -> bool { **self > **other } } @@ -129,45 +129,49 @@ pub impl Degrees: Add, Degrees> { pub impl Degrees: Sub, Degrees> { #[inline(always)] - pure fn sub(rhs: &Degrees) -> Degrees { - Degrees(*self - **rhs) + pure fn sub(&self, rhs: &Degrees) -> Degrees { + Degrees(**self - **rhs) } } pub impl Degrees: Mul> { - #[inline(always)] pure fn mul(rhs: &T) -> Degrees { - Degrees(*self * *rhs) + #[inline(always)] + pure fn mul(&self, rhs: &T) -> Degrees { + Degrees(**self * *rhs) } } pub impl Degrees: Div> { - #[inline(always)] pure fn div(rhs: &T) -> Degrees { - Degrees(*self / *rhs) + #[inline(always)] + pure fn div(&self, rhs: &T) -> Degrees { + Degrees(**self / *rhs) } } pub impl Degrees: Modulo> { - #[inline(always)] pure fn modulo(rhs: &T) -> Degrees { - Degrees(*self % *rhs) + #[inline(always)] + pure fn modulo(&self, rhs: &T) -> Degrees { + Degrees(**self % *rhs) } } pub impl Degrees: Neg> { - #[inline(always)] pure fn neg() -> Degrees { - Degrees(-*self) + #[inline(always)] + pure fn neg(&self) -> Degrees { + Degrees(-**self) } } pub impl Degrees: Eq { - #[inline(always)] pure fn eq(other: &Degrees) -> bool { *self == **other } - #[inline(always)] pure fn ne(other: &Degrees) -> bool { *self != **other } + #[inline(always)] pure fn eq(&self, other: &Degrees) -> bool { **self == **other } + #[inline(always)] pure fn ne(&self, other: &Degrees) -> bool { **self != **other } } pub impl Degrees: Ord { - #[inline(always)] pure fn lt(other: &Degrees) -> bool { *self < **other } - #[inline(always)] pure fn le(other: &Degrees) -> bool { *self <= **other } - #[inline(always)] pure fn ge(other: &Degrees) -> bool { *self >= **other } - #[inline(always)] pure fn gt(other: &Degrees) -> bool { *self > **other } + #[inline(always)] pure fn lt(&self, other: &Degrees) -> bool { **self < **other } + #[inline(always)] pure fn le(&self, other: &Degrees) -> bool { **self <= **other } + #[inline(always)] pure fn ge(&self, other: &Degrees) -> bool { **self >= **other } + #[inline(always)] pure fn gt(&self, other: &Degrees) -> bool { **self > **other } } diff --git a/src/mat.rs b/src/mat.rs index 6701029..826210d 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -326,13 +326,13 @@ pub impl Mat2: NumericMatrix2x2> { pub impl Mat2: Eq { #[inline(always)] - pure fn eq(other: &Mat2) -> bool { + pure fn eq(&self, other: &Mat2) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Mat2) -> bool { - !(self == *other) + pure fn ne(&self, other: &Mat2) -> bool { + !(self == other) } } @@ -620,13 +620,13 @@ pub impl Mat3: ToQuat { pub impl Mat3: Eq { #[inline(always)] - pure fn eq(other: &Mat3) -> bool { + pure fn eq(&self, other: &Mat3) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Mat3) -> bool { - !(self == *other) + pure fn ne(&self, other: &Mat3) -> bool { + !(self == other) } } @@ -964,13 +964,13 @@ pub impl Mat4: NumericMatrix4x4> { pub impl Mat4: Eq { #[inline(always)] - pure fn eq(other: &Mat4) -> bool { + pure fn eq(&self, other: &Mat4) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Mat4) -> bool { - !(self == *other) + pure fn ne(&self, other: &Mat4) -> bool { + !(self == other) } } diff --git a/src/quat.rs b/src/quat.rs index 771dd64..cf984d5 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -264,13 +264,13 @@ pub impl Quat: Index { pub impl Quat: Eq { #[inline(always)] - pure fn eq(other: &Quat) -> bool { + pure fn eq(&self, other: &Quat) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Quat) -> bool { - !(self == *other) + pure fn ne(&self, other: &Quat) -> bool { + !(self == other) } } diff --git a/src/vec.rs b/src/vec.rs index 17eccda..1fa7b92 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -211,13 +211,13 @@ pub impl Vec2: GeometricVector { pub impl Vec2: Eq { #[inline(always)] - pure fn eq(other: &Vec2) -> bool { + pure fn eq(&self, other: &Vec2) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Vec2) -> bool { - !(self == *other) + pure fn ne(&self, other: &Vec2) -> bool { + !(self == other) } } @@ -381,13 +381,13 @@ pub impl Vec3: GeometricVector { pub impl Vec3: Eq { #[inline(always)] - pure fn eq(other: &Vec3) -> bool { + pure fn eq(&self, other: &Vec3) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Vec3) -> bool { - !(self == *other) + pure fn ne(&self, other: &Vec3) -> bool { + !(self == other) } } @@ -551,13 +551,13 @@ pub impl Vec4: GeometricVector { pub impl Vec4: Eq { #[inline(always)] - pure fn eq(other: &Vec4) -> bool { + pure fn eq(&self, other: &Vec4) -> bool { self.default_eq(other) } #[inline(always)] - pure fn ne(other: &Vec4) -> bool { - !(self == *other) + pure fn ne(&self, other: &Vec4) -> bool { + !(self == other) } }