View Problem

Find the distance between two points

ExpandDiskEdit
groovy
distance = distance(x1, y1, x2, y2)
ExpandDiskEdit
groovy
distance = sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
ExpandDiskEdit
erlang
Distance = distance({point, 34, 78}, {point, 67, -45}),
io:format("~.2f~n", [Distance]).
ExpandDiskEdit
erlang
Distance = distance(point:new(34, 78), point:new(67, -45)),
io:format("~.2f~n", [Distance]).

Submit a new solution for groovy or erlang
There are 22 other solutions in additional languages (clojure, cpp, csharp, fantom ...)