るりまサーチ

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. integer >
  4. float >
  5. comparable >

ライブラリ

クラス

検索結果

Float#negative? -> bool (21319.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?...

OpenSSL::BN#negative? -> bool (21319.0)

自身が負である場合に true を返します。Ruby 2.5, OpenSSL 2.1.0 から利用できます。

...自身が負である場合に true を返します。Ruby 2.5, OpenSSL 2.1.0 から利用できます。

//emlist[][ruby]{
require 'openssl'
p 15.to_bn.negative? # => false
p 0.to_bn.negative? # => false
p (-5).to_bn.negative? # => true
//}...

Rational#negative? -> bool (21313.0)

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

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

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

@see Rational#positive?...

Numeric#negative? -> bool (18319.0)

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

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

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

@see Numeric#positive?...