るりまサーチ

最速Rubyリファレンスマニュアル検索!
26件ヒット [1-26件を表示] (0.046秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:@[x] > クエリ:negative?[x]

別のキーワード

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

クラス

検索結果

Float#negative? -> bool (18127.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 (18127.0)

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

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

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

@
see Numeric#positive?...

Rational#negative? -> bool (18121.0)

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

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

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

@
see Rational#positive?...