self % other -> NumericRuby 2.4.0 から[permalink][rdoc][edit]modulo(other) -> Numeric-
算術演算子。剰余を計算します。
p 13 % 4 # => 1 p 13 % -4 # => -3 p -13 % 4 # => 3 p -13 % -4 # => -1- [PARAM]
other: - 二項演算の右側の引数(対象)
- [RETURN]
- 計算結果
- [PARAM]
self % other -> NumericRuby 2.4.0 から[permalink][rdoc][edit]modulo(other) -> Numeric算術演算子。剰余を計算します。
p 13 % 4 # => 1
p 13 % -4 # => -3
p -13 % 4 # => 3
p -13 % -4 # => -1
other: