Skip to content

Commit 058a5d9

Browse files
committed
auto merge of #9459 : eliovir/rust/patch-1, r=bstrie
change formula (other solution could be using abs()).
2 parents 4d81e38 + 835960a commit 058a5d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ fn area(sh: Shape) -> float {
737737
match sh {
738738
Circle { radius: radius, _ } => float::consts::pi * square(radius),
739739
Rectangle { top_left: top_left, bottom_right: bottom_right } => {
740-
(bottom_right.x - top_left.x) * (bottom_right.y - top_left.y)
740+
(bottom_right.x - top_left.x) * (top_left.y - bottom_right.y)
741741
}
742742
}
743743
}

0 commit comments

Comments
 (0)