about summary refs log tree commit diff
path: root/src/libextra/num
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-08 22:57:31 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-09 15:41:46 +1100
commitceea85a148ec3426edfc00b8353a19c1d2df5dbf (patch)
tree34005cf06fde432a44cff41aca0a6603b12cf3a4 /src/libextra/num
parent7613b15fdbbb9bf770a2c731f4135886b0ff3cf0 (diff)
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.
Diffstat (limited to 'src/libextra/num')
-rw-r--r--src/libextra/num/complex.rs2
1 files changed, 1 insertions, 1 deletions
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());