るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.083秒)
トップページ > クラス:Integer[x] > 種類:インスタンスメソッド[x] > クエリ:_builtin[x] > クエリ:-[x] > クエリ:remainder[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

Integer#remainder(other) -> Numeric (26289.0)

self を other で割った余り r を返します。

...//emlist[][ruby]{
5.remainder(3) # => 2
-
5.remainder(3) # => -2
5.remainder(-3) # => 2
-
5.remainder(-3) # => -2

-
1234567890987654321.remainder(13731) # => -6966
-
1234567890987654321.remainder(13731.24) # => -9906.22531493148
//}

@see Integer#divmod, Integer#modulo, Numeric#modul...