2Dベクトルが正のx軸となす角度を計算します。
慣例により、正のx軸の角度は0です。角度は時計回りに増加します。
ベクトルがcreateVector()で作成された場合、 heading()は現在のangleMode()の 単位で角度を返します。
heading()の静的バージョン、つまりp5.Vector.heading(v)も 同じように動作します。
実例
シンタックス
heading()
heading(v)
パラメーター
v
p5.Vector:
角度を求めるベクトル
リターン
Number: 回転角度。
This page is generated from the comments in src/math/p5.Vector.js . Please feel free to edit it and submit a pull request!