55件ヒット
[1-55件を表示]
(0.038秒)
検索結果
先頭5件
-
Complex
# imaginary -> Numeric (36109.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Complex
# imag -> Numeric (21009.0) -
自身の虚部を返します。
...自身の虚部を返します。
//emlist[例][ruby]{
Complex(3, 2).imag # => 2
//}
@see Numeric#imag... -
Numeric
# imaginary -> 0 (15109.0) -
常に 0 を返します。
...常に 0 を返します。
//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Numeric#real、Complex#imag... -
Numeric (62.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...by 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
% | o......o o o - -
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
<< | -......o o - - -
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
abs | o......い。
=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
% | o o o......< | - o o - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
<< | - o -......^ | - o - - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
abs | o o o... -
Numeric
# imag -> 0 (9.0) -
常に 0 を返します。
...常に 0 を返します。
//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Numeric#real、Complex#imag...