remainder(other) -> NumericRuby 2.4.0 から[permalink][rdoc][edit]-
selfをotherで割った余りrを返します。rの符号はselfと同じになります。- [PARAM]
other: -
selfを割る数。
p 5.remainder(3) # => 2 p -5.remainder(3) # => -2 p 5.remainder(-3) # => 2 p -5.remainder(-3) # => -2 p -1234567890987654321.remainder(13731) # => -6966 p -1234567890987654321.remainder(13731.24) # => -9906.22531493148[SEE_ALSO] Integer#divmod, Integer#modulo, Numeric#modulo
- [PARAM]