📐 Triangle Calculator

Triangle Calculator - Compute perimeter, area (Heron) and angles from three sides, with type detection. Free, browser-only.

📐 工作原理與說明
三角形求解(SSS 已知三邊)
構成條件:任意兩邊之和 > 第三邊(a+b>c、a+c>b、b+c>a)
海倫公式:半周長 s = (a+b+c)/2,面積 = √[s(s−a)(s−b)(s−c)]
餘弦定理求內角:cos A = (b²+c²−a²) ÷ (2bc),A = arccos(…)×180/π
型別判定:任一內角 = 90° 為直角三角形|全 <90° 銳角|否則鈍角
三內角之和恆為 180°
按三角形已知條件求解邊長、角度、面積與周長。
Large-number handling: normalize by the longest side before Heron and cosine calculations, avoiding overflow from squaring 1e160-scale sides. If perimeter or area exceeds the Number range, it is shown in scientific notation while angles and type still use normalized sides.
  • 內角和:三角形三個內角之和恆為 180°。
  • 勾股定理:直角三角形滿足 a² + b² = c²,c 為斜邊。
  • 海倫公式:令 s=(a+b+c)/2,面積 = √(s(s−a)(s−b)(s−c)),已知三邊即可求面積。
  • 正餘弦定理:a/sinA = b/sinB = c/sinC;c² = a² + b² − 2ab·cosC。

Formula & Standard References

Item Formula / Note Source / Standard
Law of cosines c^2 = a^2 + b^2 - 2ab cos(C) Euclidean geometry
Law of sines a/sin(A) = b/sin(B) = c/sin(C) = 2R Euclidean geometry
Triangle inequality sum of any two sides exceeds the third Euclidean geometry
⚠️ 使用說明與注意事項

📋 常用公式

量公式
半周長 s(a+b+c)/2
面積√[s(s−a)(s−b)(s−c)]
角 Aarccos((b²+c²−a²)/(2bc))