rollup merge of #18395 : cakebaker/fix_use_of_sqrt

This commit is contained in:
Alex Crichton 2014-10-30 08:55:48 -07:00
commit b85780e7ea

View File

@ -56,7 +56,7 @@ a reference.
fn compute_distance(p1: &Point, p2: &Point) -> f64 {
let x_d = p1.x - p2.x;
let y_d = p1.y - p2.y;
sqrt(x_d * x_d + y_d * y_d)
(x_d * x_d + y_d * y_d).sqrt()
}
~~~