Law of Cosines Calculator
Compute the third side of a triangle from two sides and the included angle.
📐 計算公式
餘弦定理(本頁程式碼口徑,夾角按度輸入先化弧度):c=√(a²+b²−2ab·cosC);面積=a×b×sinC÷2;cosA=(b²+c²−a²)÷(2bc)、cosB=(a²+c²−b²)÷(2ac),反解角度時餘弦值先鉗制到 [−1,1]。校驗:a、b、C 必填且為有限數值;a>0、b>0;C 在 0°–180° 開區間,退化三角形與超範圍角度直接報錯並清空輔助表。
輸入兩邊 a、b 及其夾角 C(度),求第三邊 c。
📌 計算說明
- C=90° 退化為勾股定理。
- 3,4,90° → 5。