三角形计算器(进阶) — 公式
Triangle Area via Heron's Formula
Formula
s = (a + b + c) / 2 (semi-perimeter)
Area = sqrt(s × (s-a) × (s-b) × (s-c))
Heron's formula computes the area of any triangle when you know all three side lengths, without needing height or angles.
Inradius
The inradius (radius of the inscribed circle) is: r = Area / s
计算示例
Triangle with sides 5, 6, 7.
- s = (5+6+7)/2 = 9
- Area = √(9 × 4 × 3 × 2) = √216 ≈ 14.6969
- Inradius = 14.6969 / 9 ≈ 1.6330