Skip to content

Instantly share code, notes, and snippets.

@dchiji
Created July 15, 2009 05:51
Show Gist options
  • Save dchiji/147483 to your computer and use it in GitHub Desktop.
Save dchiji/147483 to your computer and use it in GitHub Desktop.
-module(heron).
-export([heron/3]).
heron(A, B, C) ->
S = (A + B + C) / 2,
math:sqrt(S * (S - A) * (S - B) * (S - C)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment