summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
index 4f16dcf..b640ece 100644
--- a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
@@ -198,7 +198,7 @@ public class RadialGradient_Delegate extends Gradient_Delegate {
float _x = pt2[0];
float _y = pt2[1];
- float distance = (float) Math.sqrt(_x * _x + _y * _y);
+ float distance = (float) Math.hypot(_x, _y);
data[index++] = getGradientColor(distance / mRadius);
}