るりまサーチ

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

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric %
  4. numeric +@

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 ... > >>

Numeric#ceil -> Integer (15120.0)

自身と等しいかより大きな整数のうち最小のものを返します。

...自身と等しいかより大きな整数のうち最小のものを返します。

//emlist[例][ruby]{
1.ceil #=> 1
1.2.ceil #=> 2
(-1.2).ceil #=> -1
(-1.5).ceil #=> -1
//}

@see Numeric#floor, Numeric#round, Numeric#truncate...

Numeric#finite? -> bool (15114.0)

self の絶対値が有限値の場合に true を、そうでない場合に false を返します。

...値の場合に true を、そうでない場合に false を返します。

//emlist[例][ruby]{
10.finite? # => true
Rational(3).finite? # => true

Float::INFINITY.finite? # => false
Float::INFINITY.is_a?(Numeric) # => true
//}

@see Numeric#infinite?...

Numeric#imag -> 0 (15114.0)

常に 0 を返します。

...常に 0 を返します。

//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}

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

@see Numeric#real、Complex#imag...

Numeric#imaginary -> 0 (15114.0)

常に 0 を返します。

...常に 0 を返します。

//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}

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

@see Numeric#real、Complex#imag...

Numeric#integer? -> bool (15114.0)

自身が Integer かそのサブクラスのインスタンスの場合にtrue を返し ます。そうでない場合に false を返します。

... Integer かそのサブクラスのインスタンスの場合にtrue を返し
ます。そうでない場合に false を返します。

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

//emlist[例][ruby]{
(1.0).integer? #=> false
(1).int...
...eger? #=> true
//}

@see Numeric#real?...

絞り込み条件を変える

Numeric#div(other) -> Integer (15108.0)

self を other で割った整数の商 q を返します。

...りは Numeric#modulo で求められます。
div はメソッド / を呼びだし、floorを取ることで計算されます。

メソッド / の定義はサブクラスごとの定義を用います。

@param other 自身を割る数を指定します。

//emlist[例][ruby]{
p 3.div(2) # =>...
...1
p (-3).div(2) # => -2
p (-3.0).div(2) # => -2
//}...

Numeric#negative? -> bool (15108.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 (15108.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] (12412.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] (12412.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...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>