るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. _builtin rational
  2. rational **
  3. json/add/rational to_json
  4. json/add/rational json_create

ライブラリ

検索結果

Rational#denominator -> Integer (81469.0)

分母を返します。常に正の整数を返します。

...分母を返します。常に正の整数を返します。

@return 分母を返します。

//emlist[例][ruby]{
Rational
(7).denominator # => 1
Rational
(7, 1).denominator # => 1
Rational
(9, -4).denominator # => 4
Rational
(-2, -10).denominator # => 5
//}

@see Rational#numerator...

Rational#numerator -> Integer (27112.0)

分子を返します。

...分子を返します。

@return 分子を返します。

//emlist[例][ruby]{
Rational
(7).numerator # => 7
Rational
(7, 1).numerator # => 7
Rational
(9, -4).numerator # => -9
Rational
(-2, -10).numerator # => 1
//}

@see Rational#denominator...