るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.058秒)
トップページ > クエリ:Integer[x] > クエリ:on[x] > クエリ:numerator[x]

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer downto
  5. integer upto

ライブラリ

クラス

検索結果

Rational#numerator -> Integer (21226.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...

Rational#denominator -> Integer (3107.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...