るりまサーチ

最速Rubyリファレンスマニュアル検索!
335件ヒット [301-335件を表示] (0.099秒)

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

キーワード

検索結果

<< < ... 2 3 4 >>

Numeric#negative? -> bool (24.0)

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

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

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

@
see Numeric#positive?...

Numeric#positive? -> bool (24.0)

self が 0 より大きい場合に true を返します。そうでない場合に false を返します。

...
self
が 0 より大きい場合に true を返します。そうでない場合に false を返します。

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

@
see Numeric#negative?...

Numeric#rect -> [Numeric, Numeric] (24.0)

[self, 0] を返します。

...[self, 0] を返します。

//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}

Numeric
のサブクラスは、このメソッドを適切に再定義しなければなりません。

@
see Complex#rect...

Numeric#rectangular -> [Numeric, Numeric] (24.0)

[self, 0] を返します。

...[self, 0] を返します。

//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}

Numeric
のサブクラスは、このメソッドを適切に再定義しなければなりません。

@
see Complex#rect...
<< < ... 2 3 4 >>