これが私のコードです:
# point of intersection between opposite and hypotenuse
x,y = pygame.mouse.get_pos()
# using formula for length of line
lenline1 = (x-x)**2 + (300-y)**2
lenline2 = (x-700)**2 + (y-300)**2
opposite = math.sqrt(lenline1)
adjacent = math.sqrt(lenline2)
# Converting length of lines to angle
PQ = opposite/adjacent
k = math.sin(PQ)
j = math.asin(k)
print(j)
期待した結果が得られませんでしたが、いじり回した後、近づきましたが、正しくありませんでした。誰かが私が間違っていることを教えてもらえますか?私には2つの線があります:反対と隣接そして私はsinの逆数を使用して角度を取得したいと思います。私は何を間違っているのですか。私は初心者なので、あまり詳細な情報を提供しないでください。これが難しいとは思えません。
ありがとう。