Skip to content

Commit

Permalink
Fixed a tiny bug regarding comparing the difference to epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
chewxy authored Apr 23, 2018
1 parent 533b0e9 commit d40e73e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dawson.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func ToleranceF64(a, b, e float64) bool {
e = -e
}
}
return d < e
return d <= e
}

// TolereranceF32 is a test to see if two float64s, a and b are equal,
Expand All @@ -56,7 +56,7 @@ func ToleranceF32(a, b, e float32) bool {
e = -e
}
}
return d < e
return d <= e
}

// ToleranceC128 is a test to see if two float64s, a and b are equal,
Expand Down

0 comments on commit d40e73e

Please sign in to comment.