るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. comparable >
  5. complex >

ライブラリ

クラス

検索結果

Vector#angle_with(v) -> Float (54925.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 の
ベクトルの次元が異なる場合に発...