2点間の角度

2点(2つの座標)間の角度を求める。

Aの座標 : (AX,AY)
Bの座標 : (BX,BY)
X座標での2点間の距離 : DX
Y座標での2点間の距離 : DY
角度(ラジアン) : Angle

DX = AX - BX
DY = AY -BY
Angle = Math.atan2(DY,DX)

カテゴリ:Math

タグ:

Post at 2008年07月07日 22:13





Feed


Powered by Movable Type 4.27-ja

Hosted by heteml