TriangleArea – Evaluate the area of any triangle given its sides

' evaluate the area of a triangle' given its three sidesFunction TriangleArea(side1 As Double, side2 As Double, _    side3 As Double) As Double    ' this function uses the Heron formula    Dim halfP As Double    ' evaluate half of the perimeter    halfP = (side1 + side2 + side3) / 2    TriangleArea = Sqr(halfP * (halfP - side1) * (halfP - side2) * (halfP - _        side3))End Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: