るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.262秒)
トップページ > クラス:Complex[x] > クエリ:_builtin[x] > クエリ:numerator[x] > バージョン:2.6.0[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

検索結果

Complex#numerator -> Complex (78343.0)

分子を返します。

...分子を返します。

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

@see Complex#denominator...

Complex#denominator -> Integer (24058.0)

分母を返します。

...と虚部の分母の最小公倍数を整数で返します。

1 2 3+4i <- numerator(分子)
- + -i -> ----
2 3 6 <- denominator(分母)

//emlist[例][ruby]{
Complex
('1/2+2/3i').denominator # => 6
Complex
(3).numerator # => 1
//}

@see Complex#numerator...