491件ヒット
[401-491件を表示]
(0.064秒)
別のキーワード
ライブラリ
- ビルトイン (491)
キーワード
- % (12)
- +@ (12)
- <=> (12)
- angle (12)
- arg (12)
- ceil (12)
- coerce (12)
- conj (12)
- conjugate (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)
- 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
# positive? -> bool (20.0) -
self が 0 より大きい場合に true を返します。そうでない場合に false を返します。
...self が 0 より大きい場合に true を返します。そうでない場合に false を返します。
//emlist[例][ruby]{
1.positive? # => true
0.positive? # => false
-1.positive? # => false
//}
@see Numeric#negative?... -
Numeric
# real -> Numeric (20.0) -
自身を返します。
...返します。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
10.real # => 10
-10.real # => -10
0.1.real # => 0.1
Rational(2, 3).real # => (2/3)
//}
@see Numeric#imag、Comple... -
Numeric
# real? -> bool (20.0) -
常に true を返します。(Complex またはそのサブクラスではないことを意味します。)
...ます。)
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
10.real? # => true
-10.real? # => true
0.1.real? # => true
Rational(2, 3).real? # => true
//}
@see Numeric#integer?、... -
Numeric
# rect -> [Numeric , Numeric] (20.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] (20.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
# round -> Integer (20.0) -
自身ともっとも近い整数を返します。
...0.5, -0.5 はそれぞれ 1,-1 に切り上げされます。いわゆる四捨五入ですが、偶数丸めではありません。
//emlist[例][ruby]{
1.round #=> 1
1.2.round #=> 1
(-1.2).round #=> -1
(-1.5).round #=> -2
//}
@see Numeric#ceil, Numeric#floor, Numeric#truncate... -
Numeric
# truncate -> Integer (20.0) -
0 から 自身までの整数で、自身にもっとも近い整数を返します。
...0 から 自身までの整数で、自身にもっとも近い整数を返します。
//emlist[例][ruby]{
1.truncate #=> 1
1.2.truncate #=> 1
(-1.2).truncate #=> -1
(-1.5).truncate #=> -1
//}
@see Numeric#ceil, Numeric#floor, Numeric#round... -
Numeric
# zero? -> bool (20.0) -
自身がゼロの時、trueを返します。そうでない場合は false を返します。
...自身がゼロの時、trueを返します。そうでない場合は false を返します。
//emlist[例][ruby]{
p 10.zero? #=> false
p 0.zero? #=> true
p 0.0.zero? #=> true
//}
@see Numeric#nonzero?...