るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

検索結果

Rational#negative? -> bool (35131.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 (8060.0)

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

...てください。


=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
% | o o...
...o
< | - o o - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
<< | - o...
...-
^ | - o - - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
abs | o o...