るりまサーチ

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

別のキーワード

  1. _builtin *
  2. matrix *
  3. array *
  4. vector *
  5. bigdecimal *

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Rational#*(other) -> Rational | Float (18127.0)

積を計算します。

...

@param other 自身に掛ける数

other に Float を指定した場合は、計算結果を Float で返しま
す。

//emlist[例][ruby]{
r = Rational(3, 4)
r * 2 # => (3/2)
r * 4 # => (3/1)
r * 0.5 # => 0.375
r * Rational(1, 2) # => (3/8)
//}...

Complex#*(other) -> Complex (18121.0)

積を計算します。

...積を計算します。

@param other 自身に掛ける数

//emlist[例][ruby]{
Complex(1, 2) * 2 # => (2+4i)
Complex(1, 2) * Complex(2, 3) # => (-4+7i)
Complex(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)
//}...

String#*(times) -> String (18121.0)

文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。

...self を times 回繰り返した新しい文字列

@raise ArgumentError 引数に負数を指定したときに発生します。

//emlist[例][ruby]{
p "str" * 3 # => "strstrstr"

str = "abc"
p str * 4 # => "abcabcabcabc"
p str * 0 # => ""
p str # => "abc" (変化なし)
//}...

Array#*(sep) -> String (18110.0)

指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。

...ep) と同じ動作をします。

@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。

//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}

@see Array#join...

Array#*(times) -> Array (18110.0)

配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。

...or 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

@raise ArgumentError 引数に負の数を指定した場合に発生します。

//emlist[例][ruby]{
p [1, 2, 3] * 3 #=> [1, 2, 3, 1, 2, 3, 1, 2, 3]
//}...

絞り込み条件を変える

Float#*(other) -> Float (18109.0)

算術演算子。積を計算します。

...算術演算子。積を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}...

Integer#*(other) -> Numeric (18109.0)

算術演算子。積を計算します。

...算術演算子。積を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

//emlist[][ruby]{
2 * 3 # => 6
//}...

Bignum#*(other) -> Fixnum | Bignum | Float (18103.0)

算術演算子。積を計算します。

算術演算子。積を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

Fixnum#*(other) -> Fixnum | Bignum | Float (18103.0)

算術演算子。積を計算します。

算術演算子。積を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

Float#**(other) -> Float (6109.0)

算術演算子。冪を計算します。

...算術演算子。冪を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 冪
1.2 ** 3.0 # => 1.7279999999999998
3.0 + 4.5 - 1.3 / 2.4 * 3 % 1.2 ** 3.0 # => 5.875
0.0 ** 0 # => 1.0
//}...

絞り込み条件を変える

Bignum#**(other) -> Fixnum | Bignum | Float (6103.0)

算術演算子。冪(べき乗)を計算します。

...算術演算子。冪(べき乗)を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1...

Complex#**(other) -> Complex (6103.0)

冪(べき)乗を計算します。

...冪(べき)乗を計算します。

@param other 自身を other 乗する数

//emlist[例][ruby]{
Complex('i') ** 2 # => (-1+0i)
//}...
<< 1 2 3 ... > >>