Bug 1305201 - Have BasePoint::Length return a Coord instead of a raw type. r?botond
MozReview-Commit-ID: 3MJmnQ866pA
--- a/gfx/2d/BasePoint.h
+++ b/gfx/2d/BasePoint.h
@@ -73,17 +73,17 @@ struct BasePoint {
Sub operator-() const {
return Sub(-x, -y);
}
T DotProduct(const Sub& aPoint) const {
return x * aPoint.x + y * aPoint.y;
}
- T Length() const {
+ Coord Length() const {
return hypot(x, y);
}
T LengthSquare() const {
return x * x + y * y;
}
// Round() is *not* rounding to nearest integer if the values are negative.