るりまサーチ

最速Rubyリファレンスマニュアル検索!
41件ヒット [1-41件を表示] (0.013秒)
トップページ > クエリ: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 (18119.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 (18119.0)

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

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

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

@see Numeric#positive?...

OpenSSL::BN#negative? -> bool (18119.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 (18113.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 (6.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...modulo | o o o - -
nan? | - - o - -
negative?
| o - o o -
next | - o - - -...

絞り込み条件を変える