るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Vector#magnitude -> Float (24307.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 (21319.0)

self の絶対値を返します。

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

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

Numeric#magnitude -> Numeric (21313.0)

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

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

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

Complex#magnitude -> Numeric (21307.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 (18313.0)

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

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

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

絞り込み条件を変える

Rational#magnitude -> Rational (18307.0)

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

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

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

NEWS for Ruby 3.0.0 (9507.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...# 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-line pattern match...
...ple times in a method when possible.
* Optimize accesses in some core classes like Hash and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`...

Numeric (8202.0)

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

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

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッド...
...ださい。


=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
-
------------------------------------------------------------------------------------------...
...spect | - - o o o o o
integer? | o o - - - - -
lcm | - o - - - - -
magnitude
...
...=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
-
-------------------------------------------------------------------------------
% | o o o -...
...- - -
lcm | - o - - -
Numeric Integer Float Rational Complex
-
-------------------------------------------------------------------------------
magnitude
|...

Vector#norm -> Float (6107.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 (6107.0)

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

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

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

@see Vector#normalize...

絞り込み条件を変える

<< 1 2 > >>