るりまサーチ

最速Rubyリファレンスマニュアル検索!
494件ヒット [101-200件を表示] (0.033秒)
トップページ > クラス:Complex[x] > クエリ:-[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 ... > >>

Complex#*(other) -> Complex (102.0)

積を計算します。

...積を計算します。

@param other 自身に掛ける数

//emlist[例][ruby]{
Complex
(1, 2) * 2 # => (2+4i)
Complex
(1, 2) * Complex(2, 3) # => (-4+7i)
Complex
(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)
//}...

Complex#**(other) -> Complex (102.0)

冪(べき)乗を計算します。

...冪(べき)乗を計算します。

@param other 自身を other 乗する数

//emlist[例][ruby]{
Complex
('i') ** 2 # => (-1+0i)
//}...

Complex#+(other) -> Complex (102.0)

和を計算します。

...和を計算します。

@param other 自身に足す数

//emlist[例][ruby]{
Complex
(1, 2) + Complex(2, 3) # => (3+5i)
//}...

Complex#/(other) -> Complex (102.0)

商を計算します。

...商を計算します。

@param other 自身を割る数

//emlist[例][ruby]{
Complex
(10.0) / 3 # => (3.3333333333333335+(0/1)*i)
Complex
(10) / 3 # => ((10/3)+(0/1)*i)
//}

@see Numeric#quo...

Complex#<(other) -> bool (102.0)

@undef

@undef

絞り込み条件を変える

Complex#<=(other) -> bool (102.0)

@undef

@undef

Complex#==(other) -> bool (102.0)

数値として等しいか判定します。

...数値として等しいか判定します。

@param other 自身と比較する数値

//emlist[例][ruby]{
Complex
(2, 1) == Complex(1) # => false
Complex
(1, 0) == Complex(1) # => true
Complex
(1, 0) == 1 # => true
//}...

Complex#>(other) -> bool (102.0)

@undef

@undef

Complex#>=(other) -> bool (102.0)

@undef

@undef

Complex#abs -> Numeric (102.0)

自身の絶対値を返します。

...す。

以下の計算の結果を Float オブジェクトで返します。

sqrt(self.real ** 2 + self.imag ** 2)

//emlist[例][ruby]{
Complex
(1, 2).abs # => 2.23606797749979
Complex
(3, 4).abs # => 5.0
Complex
('1/2', '1/2').abs # => 0.7071067811865476
//}

@see Complex#abs2...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>