Sha256: d49f5428859bcf7dc086fb303e8759049c06c578f7591fcc7ca11d6203c90c37
Contents?: true
Size: 320 Bytes
Versions: 17
Compression:
Stored size: 320 Bytes
Contents
unless Float.method_defined? :next_float require 'backports/tools/float_integer_conversion' class Float def next_float return Float::INFINITY if self == Float::INFINITY r = Backports.integer_to_float(Backports.float_to_integer(self) + 1) r == 0 ? -0.0 : r # Map +0.0 to -0.0 end end end
Version data entries
17 entries across 17 versions & 1 rubygems