Bug 1305201 - Have BasePoint::Length return a Coord instead of a raw type. r?botond draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 26 Sep 2016 15:34:36 -0400
changeset 417741 284de694717ad7c4deb270db43735a7a96daaf82
parent 417649 c55bcb7c777ea09431b4d16903ed079ae5632648
child 532160 b1afc03b76789c469dd2b643afb3558e066a6473
push id30479
push userkgupta@mozilla.com
push dateMon, 26 Sep 2016 19:35:00 +0000
reviewersbotond
bugs1305201
milestone52.0a1
Bug 1305201 - Have BasePoint::Length return a Coord instead of a raw type. r?botond MozReview-Commit-ID: 3MJmnQ866pA
gfx/2d/BasePoint.h
--- 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.