Chromium Code Reviews| Index: src/core/SkPoint.cpp |
| diff --git a/src/core/SkPoint.cpp b/src/core/SkPoint.cpp |
| index 719ee54b225ae72e57ee6752ab22a107178adc66..d2daa6dea04097a94e9de1545cb598a839e01ada 100644 |
| --- a/src/core/SkPoint.cpp |
| +++ b/src/core/SkPoint.cpp |
| @@ -168,7 +168,14 @@ bool SkPoint::setLength(float x, float y, float length) { |
| // divide by inf. and return (0,0) vector. |
| double xx = x; |
| double yy = y; |
| + #ifdef SK_BUILD_FOR_IOS |
| + double dscale = length / sqrt(xx * xx + yy * yy); |
|
reed1
2014/07/10 18:39:39
Can we add a comment and/or bug/test ref to explai
caryclark
2014/07/10 21:07:03
Done.
|
| + fX = x * dscale; |
| + fY = y * dscale; |
| + return true; |
| + #else |
| scale = (float)(length / sqrt(xx * xx + yy * yy)); |
| + #endif |
| } |
| fX = x * scale; |
| fY = y * scale; |