Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class Float
def near_enough?(other, epsilon = Float::EPSILON)
(self - other.to_f).abs < epsilon.to_f
end
end
@kotp
Owner

Greatly error prone for floats less than 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.