るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. _builtin angle
  2. vector angle_with
  3. matrix angle_with
  4. complex angle
  5. float angle

ライブラリ

クラス

検索結果

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

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

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

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

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