Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libstd/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down