斜辺と角度から、高さと底辺を計算するサンプル
import math
# 斜辺
hypotenuse = 1
# 角度
angle = 30
# 斜辺と角度から高さを求める
height = hypotenuse * math.sin(math.pi * angle / 180)
# 斜辺と角度から底辺を求める
bottom = hypotenuse * math.cos(math.pi * angle / 180)
print(height)
print(bottom)
戻る
ホームページ テンプレート フリー
Design by