るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. _builtin negative?
  2. bigdecimal sign_negative_zero
  3. bigdecimal sign_negative_finite
  4. bigdecimal sign_negative_infinite
  5. float negative?

ライブラリ

クラス

検索結果

Float#negative? -> bool (54361.0)

self が 0 未満の場合に true を返します。そうでない場合に false を返します。

self が 0 未満の場合に true を返します。そうでない場合に false を返します。

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

@see Float#positive?

Numeric#negative? -> bool (54361.0)

self が 0 未満の場合に true を返します。そうでない場合に false を返します。

self が 0 未満の場合に true を返します。そうでない場合に false を返します。

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

@see Numeric#positive?