記事見出し索引
Math.atan, Math.atan2 : ActionScript
Math.atan, Math.atan2の覚書。
ActionScriptの逆正接関数(アークタンジェント)はMath.atan,Math.atan2の2つがある。

ActionScriptのY座標は下向きが正。
Math.atan()の引数は三角比。上の図では例えば(x/y)。
-x/-y = x/yなのでMath.atanは同じ値(θ)を返す。
一方、Math.atan2は引数を二つとり、Math.atan2(y, x)はθを、Math.atan2(-y,-x)はθ’を返す。
引数の順番に注意。
atanの戻り値は-π/2 ~ π/2。
スポンサード リンク
Trackbacks
-
[...] Math.atan, Math.atan2 : ActionScript | findxfine -世界中の素敵なWeb技術をご紹介- (tags: actionscript math) [...]
コメント
コメントの投稿
改行と段落タグは自動で挿入されます。メールアドレスは表示されません。利用可能な HTML タグ: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
