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]