539件ヒット
[101-200件を表示]
(0.069秒)
ライブラリ
- ビルトイン (539)
キーワード
- % (12)
- +@ (12)
- -@ (12)
-
/ (12) - <=> (12)
- angle (12)
- arg (12)
- ceil (12)
- coerce (12)
- conj (12)
- conjugate (12)
- denominator (12)
- div (12)
- divmod (12)
- eql? (12)
- fdiv (12)
- finite? (9)
- floor (12)
- imag (12)
- imaginary (12)
- infinite? (9)
- integer? (12)
- modulo (12)
- negative? (10)
- nonzero? (12)
- numerator (12)
- phase (12)
- polar (12)
- positive? (10)
- quo (12)
- real (12)
- real? (12)
- rect (12)
- rectangular (12)
- remainder (12)
- round (12)
- step (93)
- truncate (12)
- zero? (12)
検索結果
先頭5件
-
Numeric
# finite? -> bool (36132.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 (36132.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 (36132.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 (36132.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 (36120.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 (36120.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 (36120.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] (33628.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] (33628.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
# polar -> [Numeric , Numeric] (33624.0) -
自身の絶対値と偏角を配列にして返します。正の数なら [self, 0]、負の数な ら [-self, Math::PI] を返します。
...ath::PI] を返します。
//emlist[例][ruby]{
1.0.polar # => [1.0, 0]
2.0.polar # => [2.0, 0]
-1.0.polar # => [1.0, 3.141592653589793]
-2.0.polar # => [2.0, 3.141592653589793]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Co...