Skip to content

Commit

Permalink
tutorial.md : correct formula in fn area()
Browse files Browse the repository at this point in the history
change formula (other solution could be using abs()).
  • Loading branch information
eliovir committed Sep 24, 2013
1 parent 18e3bcd commit 835960a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/tutorial.md
Expand Up @@ -737,7 +737,7 @@ fn area(sh: Shape) -> float {
match sh {
Circle { radius: radius, _ } => float::consts::pi * square(radius),
Rectangle { top_left: top_left, bottom_right: bottom_right } => {
(bottom_right.x - top_left.x) * (bottom_right.y - top_left.y)
(bottom_right.x - top_left.x) * (top_left.y - bottom_right.y)
}
}
}
Expand Down

5 comments on commit 835960a

@bors
Copy link
Contributor

@bors bors commented on 835960a Sep 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 835960a Sep 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging eliovir/rust/patch-1 = 835960a into auto

@bors
Copy link
Contributor

@bors bors commented on 835960a Sep 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eliovir/rust/patch-1 = 835960a merged ok, testing candidate = 058a5d9

@bors
Copy link
Contributor

@bors bors commented on 835960a Sep 28, 2013

@bors
Copy link
Contributor

@bors bors commented on 835960a Sep 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 058a5d9

Please sign in to comment.