611件ヒット
[101-200件を表示]
(0.115秒)
ライブラリ
- ビルトイン (611)
キーワード
- % (12)
- +@ (12)
- -@ (12)
-
/ (12) - <=> (12)
- abs (12)
- abs2 (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)
- magnitude (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)
-
to
_ c (12) -
to
_ int (12) - truncate (12)
- zero? (12)
検索結果
先頭5件
-
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...