るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin positive?
  2. bigdecimal sign_positive_zero
  3. bigdecimal sign_positive_finite
  4. bigdecimal sign_positive_infinite
  5. float positive?

ライブラリ

検索結果

Rational#positive? -> bool (54343.0)

self が 0 より大きい場合に true を返します。そうでない場合に false を返します。

...self が 0 より大きい場合に true を返します。そうでない場合に false を返します。

//emlist[例][ruby]{
Rational
(1, 2).positive? # => true
Rational
(-1, 2).positive? # => false
//}

@see Rational#negative?...