るりまサーチ

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

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. open3 capture2e
  4. matrix rank_e
  5. matrix det_e

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Vector#magnitude -> Float (24401.0)

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

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

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

@see Vector#normalize...

Integer#magnitude -> Integer (21413.0)

self の絶対値を返します。

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

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

Numeric#magnitude -> Numeric (21407.0)

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

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

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

Complex#magnitude -> Numeric (21401.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.7071067811865476
//}

@see Complex#abs2...

Float#magnitude -> Float (18407.0)

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

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

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

絞り込み条件を変える

Bignum#magnitude -> Fixnum | Bignum (18401.0)

self の絶対値を返します。

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

Fixnum#magnitude -> Fixnum | Bignum (18401.0)

self の絶対値を返します。

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

Rational#magnitude -> Rational (18401.0)

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

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

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

Numeric (8202.0)

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

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

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

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...fferent behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 =>...
...=> [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

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

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

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-l...

絞り込み条件を変える

Vector#norm -> Float (6201.0)

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

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

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

@see Vector#normalize...

Vector#r -> Float (6201.0)

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

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

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

@see Vector#normalize...
<< 1 2 > >>