るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.043秒)

別のキーワード

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

クラス

検索結果

Float#positive? -> bool (54367.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?

Numeric#positive? -> bool (54367.0)

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

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

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

@see Numeric#negative?