diff options
| author | bors <bors@rust-lang.org> | 2014-01-09 05:06:33 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-09 05:06:33 -0800 |
| commit | ab9ec6d59a0e5e79e553e0e4570a28ded1ead1aa (patch) | |
| tree | 5e07a6413e9cd17fa3d5efcde3b2488b7c802478 /src/libextra/num | |
| parent | fb44e20f657302e9b69101d0c26b095636349d38 (diff) | |
| parent | ceea85a148ec3426edfc00b8353a19c1d2df5dbf (diff) | |
auto merge of #11402 : bjz/rust/remove-approx, r=alexcrichton
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases. Third party libraries should implement their own if they need something like it. This closes #5316. r? @alexcrichton, @pcwalton
Diffstat (limited to 'src/libextra/num')
| -rw-r--r-- | src/libextra/num/complex.rs | 2 |
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()); |
