22件ヒット
[1-22件を表示]
(0.092秒)
検索結果
-
Complex
# to _ c -> self (18333.0) -
self を返します。
...
self を返します。
//emlist[例][ruby]{
Complex(2).to_c # => (2+0i)
Complex(-8, 6).to_c # => (-8+6i)
//}... -
Numeric
# to _ c -> Complex (18250.0) -
自身を複素数 (Complex) に変換します。Complex(self, 0) を返します。
...自身を複素数 (Complex) に変換します。Complex(self, 0) を返します。
//emlist[例][ruby]{
1.to_c # => (1+0i)
-1.to_c # => (-1+0i)
1.0.to_c # => (1.0+0i)
Rational(1, 2).to_c # => ((1/2)+0i)
//}
Numeric のサブクラスは、このメソッド...