From ceea85a148ec3426edfc00b8353a19c1d2df5dbf Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Wed, 8 Jan 2014 22:57:31 +1100 Subject: Remove ApproxEq and assert_approx_eq! This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases. --- src/libextra/num/complex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libextra/num') diff --git a/src/libextra/num/complex.rs b/src/libextra/num/complex.rs index 58af80fefb7..b4795c7e66b 100644 --- a/src/libextra/num/complex.rs +++ b/src/libextra/num/complex.rs @@ -268,7 +268,7 @@ mod test { #[test] fn test_arg() { fn test(c: Complex64, arg: f64) { - assert!(c.arg().approx_eq(&arg)) + assert!((c.arg() - arg).abs() < 1.0e-6) } test(_1_0i, 0.0); test(_1_1i, 0.25 * Real::pi()); -- cgit 1.4.1-3-g733a5