diff options
author | reed <reed@google.com> | 2015-05-12 09:47:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 09:47:22 -0700 |
commit | 67d71c898249a7af3523b16c6a69895a63bfae0a (patch) | |
tree | 718e9b0eb395ffd67ec0e1bcf3074f0289f89600 /include/core/SkPoint.h | |
parent | 7da2e55ccbad4868a455c1c9f23e5f63bd99e916 (diff) |
stop calling SkScalarDiv
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1135053002
Diffstat (limited to 'include/core/SkPoint.h')
-rw-r--r-- | include/core/SkPoint.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h index 4a97391c70..52d01ae88c 100644 --- a/include/core/SkPoint.h +++ b/include/core/SkPoint.h @@ -348,6 +348,16 @@ struct SK_API SkPoint { fY -= v.fY; } + SkPoint operator*(SkScalar scale) const { + return Make(fX * scale, fY * scale); + } + + SkPoint& operator*=(SkScalar scale) { + fX *= scale; + fY *= scale; + return *this; + } + /** * Returns true if both X and Y are finite (not infinity or NaN) */ |