about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-01-29 13:58:39 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-29 13:58:39 -0800
commita80a65b3b7affa9b070785bf2dd34a25aea3932a (patch)
treecbddda1f1b43e320b15565532d01417528bfdc7a /src/libstd
parent95b892c8a723ad88e868e3914c3d29a585008ac2 (diff)
parent1aa9fdff5665feb809e61c98dadc969227e2bf98 (diff)
Merge pull request #4676 from thestinger/fuzzy
fix FuzzyEq
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/cmp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs
index b5e863c739e..472f03d0551 100644
--- a/src/libstd/cmp.rs
+++ b/src/libstd/cmp.rs
@@ -24,7 +24,7 @@ pub trait FuzzyEq {
 
 impl float: FuzzyEq {
     pure fn fuzzy_eq(&self, other: &float) -> bool {
-        self.fuzzy_eq_eps(other, fuzzy_epsilon)
+        self.fuzzy_eq_eps(other, &fuzzy_epsilon)
     }
 
     pure fn fuzzy_eq_eps(&self, other: &float, epsilon: &float) -> bool {
@@ -34,7 +34,7 @@ impl float: FuzzyEq {
 
 impl f32: FuzzyEq {
     pure fn fuzzy_eq(&self, other: &f32) -> bool {
-        self.fuzzy_eq_eps(other, fuzzy_epsilon as f32)
+        self.fuzzy_eq_eps(other, &(fuzzy_epsilon as f32))
     }
 
     pure fn fuzzy_eq_eps(&self, other: &f32, epsilon: &f32) -> bool {
@@ -44,7 +44,7 @@ impl f32: FuzzyEq {
 
 impl f64: FuzzyEq {
     pure fn fuzzy_eq(&self, other: &f64) -> bool {
-        self.fuzzy_eq_eps(other, fuzzy_epsilon as f64)
+        self.fuzzy_eq_eps(other, &(fuzzy_epsilon as f64))
     }
 
     pure fn fuzzy_eq_eps(&self, other: &f64, epsilon: &f64) -> bool {