るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.015秒)
トップページ > バージョン:2.7.0[x] > クエリ:Math[x] > クラス:Vector[x]

別のキーワード

  1. math log
  2. math sqrt
  3. _builtin math
  4. bigdecimal/math e
  5. bigdecimal/math pi

ライブラリ

検索結果

Vector#angle_with(v) -> Float (22.0)

v と self がなす角度を返します。

...lf がなす角度を返します。

//emlist[例][ruby]{
require 'matrix'
Vector
[1, 0].angle_with(Vector[0, 1]) # => Math::PI/2
//}

@param v このベクトルと self とがなす角度を計算します
@raise ZeroVectorError self もしくは v のどちらかが零ベクトルである場合...