11件ヒット
[1-11件を表示]
(0.137秒)
ライブラリ
- ビルトイン (11)
検索結果
-
Numeric
# truncate -> Integer (15301.0) -
0 から 自身までの整数で、自身にもっとも近い整数を返します。
...0 から 自身までの整数で、自身にもっとも近い整数を返します。
//emlist[例][ruby]{
1.truncate #=> 1
1.2.truncate #=> 1
(-1.2).truncate #=> -1
(-1.5).truncate #=> -1
//}
@see Numeric#ceil, Numeric#floor, Numeric#round...