るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. thread abort_on_exception=

ライブラリ

クラス

検索結果

Rational#negative? -> bool (21213.0)

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

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

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

@see Rational#positive?...