123456789101112131415161718 |
- -module(second).
- -import (first, [mult/2, square/1]).
- -export([hypotenuse/2,
- perimeter/2,
- area/2]).
- hypotenuse(A,B) ->
- math:sqrt(square(A) + square(B)).
- perimeter(A,B) ->
- A + B + hypotenuse(A,B).
- area(A,B) ->
- mult(mult(A,B), 0.5).
|