Thursday, May 11, 2017

Herons Formula

Herons formula returns the area of an triangle by the length of its sides.

function heron(a,b,c)=
let(s=(a+b+c)/2)
sqrt(abs(s*(s-a)*(s-b)*(s-c)));


No comments:

Post a Comment