Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
長さと角度が与えられたときに、どのように線の座標を計算できますか (使用される式)。
長さと角度を入力として受け取り、線を描画するポップアップボックスを作成する必要があります。式だけが必要です
ラインの一方の端が にあると仮定すると(x0, y0)、もう一方の端は次のようになります。
(x0, y0)
x1 = x0 + r cos(t * pi / 180) y1 = y0 + r sin(t * pi / 180)
ここrで、 は線の長さ、 はt度単位の角度です。
r
t