Skip to content

Commit 1e4fccd

Browse files
committed
2 parents 17529a6 + b2244ce commit 1e4fccd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ch4/kas_geometry.erl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ test() ->
3939

4040
%% area function
4141
area({square, Side})-> Side * Side;
42-
area({rectangle, Width, Height}) -> Width * Height;
42+
area({rectangle, Width, Height}) -> Width * Height;
4343
area({triangle, A,B,C})-> P=(A+B+C)/2,math:sqrt(P*(P-A)*(P-B)*(P-C));
4444
area({circle, Radius})-> 3.14159 * Radius * Radius.
4545

4646

4747
%% perimeter function
4848
perimeter({square, Side}) -> 4 * Side;
49-
perimeter({square_d, Diagonal}) -> 2* math:sqrt(2) * Diagonal;
50-
perimeter({rectangle, Width, Height}) -> 2 * (Width + Height);
49+
perimeter({square_d, Diagonal}) -> 2* math:sqrt(2) * Diagonal;
50+
perimeter({rectangle, Width, Height}) -> 2 * (Width + Height);
5151
perimeter({rhombus, Side}) -> 4 * Side;
52-
perimeter({trapeze,Side_A,Side_B,Side_C,Side_D}) -> Side_A + Side_B + Side_C + Side_D;
53-
perimeter({circle, Radius}) -> 2 * math:pi() * Radius.
52+
perimeter({trapeze,Side_A,Side_B,Side_C,Side_D}) -> Side_A + Side_B + Side_C + Side_D;
53+
perimeter({circle, Radius}) -> 2 * math:pi() * Radius.
5454

5555
%% circumference
56-
circumference({radius, Radius}) -> 2 * math:pi() * Radius;
57-
circumference({diameter, Diameter}) -> math:pi() * Diameter.
56+
circumference({radius, Radius}) -> 2 * math:pi() * Radius;
57+
circumference({diameter, Diameter}) -> math:pi() * Diameter.
5858

5959
%% commands
6060
%

0 commit comments

Comments
 (0)