diff options
| author | bors <bors@rust-lang.org> | 2013-09-28 05:26:04 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-28 05:26:04 -0700 |
| commit | 058a5d97a278ddd40791b911c28d993d4a34f885 (patch) | |
| tree | c4f4a640d38b088a98544afaef7b1562be66db07 | |
| parent | 4d81e385124a8c06ead9a1fdc08a7bacb940ad4b (diff) | |
| parent | 835960a3331bdabc7f6251a66c284fe0a3b98d10 (diff) | |
| download | rust-058a5d97a278ddd40791b911c28d993d4a34f885.tar.gz rust-058a5d97a278ddd40791b911c28d993d4a34f885.zip | |
auto merge of #9459 : eliovir/rust/patch-1, r=bstrie
change formula (other solution could be using abs()).
| -rw-r--r-- | doc/tutorial.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index 2f9a84d984f..2a7bea002e7 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -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) } } } |
