Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/when_exe/core/compatibility.rb

Overview

浮動小数点数

Constant Summary collapse

INFINITY =
MAX

Instance Method Summary collapse

Instance Method Details

#to_rObject



71
72
73
74
75
# File 'lib/when_exe/core/compatibility.rb', line 71

def to_r
  it  = When::Coordinates::Residue.new(self, 1).enum_for
  res = it.succ while it.has_next?
  Rational(*res[0..1])
end