るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

クラス

検索結果

Float#positive? -> bool (63358.0)

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

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

//emlist[例][ruby]{
0.1.positive? # => true
0.0.positive? # => false
-0.1.positive? # => false
//}

@see Float#negative?

Rational#positive? -> bool (63340.0)

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

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

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

@see Rational#negative?