最速Rubyリファレンスマニュアル検索!
すべて(11)
2.1.0(1)
2.2.0(1)
2.3.0(1)
2.4.0(1)
2.5.0(1)
2.6.0(1)
2.7.0(1)
3.0(1)
3.1(1)
3.2(1)
3.3(1)
1件ヒット
[1-1件を表示]
(0.015秒)
トップページ
>
:
angle
>
:
phase
>
:
クラス
>
:3.0
別のキーワード
_builtin angle
complex angle
float angle
numeric angle
vector angle_with
ライブラリ
ビルトイン
(1)
検索結果
先頭1件
Numeric
Numeric
(40.0)
3.0
クラス
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...
d
//}
また、任意桁の切上げ、切捨て、四捨五入を行うメソッドは以下のように
定義できます。
//emlist[][ruby]{
class
Numeric
def roundup(d=0)
x = 10**d
if self > 0
self.quo(x).ceil * x
else
self.quo(x).floor * x
end
end
def roun
...
Float
Integer