Class: Float

Inherits:
Numeric show all
Defined in:
opal/opal/corelib/marshal/write_buffer.rb,
opal/opal/corelib/number.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Numeric

#%, #+@, #-@, #<=>, #__coerced__, #abs, #abs2, #angle, #ceil, #clone, #coerce, #conj, #denominator, #div, #divmod, #dup, #fdiv, #finite?, #floor, #i, #imag, #infinite?, #integer?, #negative?, #nonzero?, #numerator, #polar, #positive?, #quo, #real, #real?, #rect, #round, #step, #to_c, #to_int, #truncate, #zero?

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?, #clamp

Class Method Details

.===(other) ⇒ Object



954
955
956
# File 'opal/opal/corelib/number.rb', line 954

def ===(other)
  `!!other.$$is_number`
end

.allocateObject



948
949
950
# File 'opal/opal/corelib/number.rb', line 948

def allocate
  ::Kernel.raise ::TypeError, "allocator undefined for #{name}"
end

Instance Method Details

#__marshal__(buffer) ⇒ Object



32
33
34
35
36
# File 'opal/opal/corelib/marshal/write_buffer.rb', line 32

def __marshal__(buffer)
  buffer.save_link(self)
  buffer.append('f')
  buffer.write_float(self)
end