るりまサーチ

最速Rubyリファレンスマニュアル検索!
130件ヒット [1-100件を表示] (0.148秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:magnitude[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Vector#magnitude -> Float (21202.0)

ベクトルの大きさ(ノルム)を返します。

...ベクトルの大きさ(ノルム)を返します。

//emlist[例][ruby]{
r
equire 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}

@see Vector#normalize...

Vector#r -> Float (21202.0)

ベクトルの大きさ(ノルム)を返します。

...ベクトルの大きさ(ノルム)を返します。

//emlist[例][ruby]{
r
equire 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}

@see Vector#normalize...

Integer#magnitude -> Integer (18313.0)

self の絶対値を返します。

...self の絶対値を返します。

//emlist[][ruby]{
-
12345.abs # => 12345
12345.abs # => 12345
-
1234567890987654321.abs # => 1234567890987654321
//}...

Numeric#magnitude -> Numeric (18307.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
12.abs #=> 12
(-34.56).abs #=> 34.56
-
34.56.abs #=> 34.56
//}...

Rational#magnitude -> Rational (18301.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
R
ational(1, 2).abs # => (1/2)
R
ational(-1, 2).abs # => (1/2)
//}...

絞り込み条件を変える

Complex#magnitude -> Numeric (15301.0)

自身の絶対値を返します。

...自身の絶対値を返します。

以下の計算の結果を Float オブジェクトで返します。

sqrt(self.real ** 2 + self.imag ** 2)

//emlist[例][ruby]{
Complex(1, 2).abs # => 2.23606797749979
Complex(3, 4).abs # => 5.0
Complex('1/2', '1/2').abs # => 0.70710678118...

Vector#norm -> Float (9202.0)

ベクトルの大きさ(ノルム)を返します。

...ベクトルの大きさ(ノルム)を返します。

//emlist[例][ruby]{
r
equire 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}

@see Vector#normalize...

Numeric (8190.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは...
...るメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce)だけを定義...
...ct | - - o o o o o
integer? | o o - - - - -
lcm | - o - - - - -
magnitude
|...
...- - -
lcm | - o - - -
Numeric Integer Float Rational Complex
-
-------------------------------------------------------------------------------
magnitude
|...

NEWS for Ruby 3.0.0 (3300.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...precation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is re...
...ore classes like Hash and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader...

Integer#abs -> Integer (3213.0)

self の絶対値を返します。

...self の絶対値を返します。

//emlist[][ruby]{
-
12345.abs # => 12345
12345.abs # => 12345
-
1234567890987654321.abs # => 1234567890987654321
//}...

絞り込み条件を変える

<< 1 2 > >>