Class: Integer

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

Constant Summary

MAX =
`Math.pow(2, 30) - 1`
MIN =
`-Math.pow(2, 30)`

Class Method Summary collapse

Methods inherited from Numeric

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

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?, normalize

Class Method Details

.===(other) ⇒ Object



719
720
721
722
723
724
725
726
727
# File 'opal/opal/corelib/number.rb', line 719

def self.===(other)
  %x{
    if (!other.$$is_number) {
      return false;
    }

    return (other % 1) === 0;
  }
end