From 8139e634fb108f3ec40af6f980c8b7e201b8c73c Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Fri, 12 Jul 2013 12:19:40 +1000 Subject: [PATCH] Remove conflicting ApproxEq impls --- src/core/vec.rs | 56 ------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/core/vec.rs b/src/core/vec.rs index f064878..f3c69a2 100644 --- a/src/core/vec.rs +++ b/src/core/vec.rs @@ -408,24 +408,6 @@ impl Vec2 { } } -impl> ApproxEq for Vec2 { - #[inline] - pub fn approx_epsilon() -> T { - ApproxEq::approx_epsilon::() - } - - #[inline] - pub fn approx_eq(&self, other: &Vec2) -> bool { - self.approx_eq_eps(other, &ApproxEq::approx_epsilon::()) - } - - #[inline] - pub fn approx_eq_eps(&self, other: &Vec2, epsilon: &T) -> bool { - self.index(0).approx_eq_eps(other.index(0), epsilon) && - self.index(1).approx_eq_eps(other.index(1), epsilon) - } -} - #[cfg(test)] mod vec2_tests { use core::vec::*; @@ -996,25 +978,6 @@ impl Vec3 { } } -impl> ApproxEq for Vec3 { - #[inline] - pub fn approx_epsilon() -> T { - ApproxEq::approx_epsilon::() - } - - #[inline] - pub fn approx_eq(&self, other: &Vec3) -> bool { - self.approx_eq_eps(other, &ApproxEq::approx_epsilon::()) - } - - #[inline] - pub fn approx_eq_eps(&self, other: &Vec3, epsilon: &T) -> bool { - self.index(0).approx_eq_eps(other.index(0), epsilon) && - self.index(1).approx_eq_eps(other.index(1), epsilon) && - self.index(2).approx_eq_eps(other.index(2), epsilon) - } -} - #[cfg(test)] mod vec3_tests{ use core::vec::*; @@ -1613,25 +1576,6 @@ impl Vec4 { } } -impl> ApproxEq for Vec4 { - #[inline] - pub fn approx_epsilon() -> T { - ApproxEq::approx_epsilon::() - } - - #[inline] - pub fn approx_eq(&self, other: &Vec4) -> bool { - self.approx_eq_eps(other, &ApproxEq::approx_epsilon::()) - } - - #[inline] - pub fn approx_eq_eps(&self, other: &Vec4, epsilon: &T) -> bool { - self.index(0).approx_eq_eps(other.index(0), epsilon) && - self.index(1).approx_eq_eps(other.index(1), epsilon) && - self.index(2).approx_eq_eps(other.index(2), epsilon) && - self.index(3).approx_eq_eps(other.index(3), epsilon) - } -} #[cfg(test)] mod vec4_tests {