move SkScalarMean into its only caller, reducing out public API exposure
BUG= Review URL: https://codereview.chromium.org/117973002 git-svn-id: http://skia.googlecode.com/svn/trunk@12732 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
e15b2f5296
commit
6e252d49c9
@ -139,9 +139,6 @@ inline SkScalar SkScalarSquare(SkScalar x) { return x * x; }
|
||||
/** Returns the average of two SkScalars (a+b)/2
|
||||
*/
|
||||
#define SkScalarAve(a, b) (((a) + (b)) * 0.5f)
|
||||
/** Returns the geometric mean of two SkScalars
|
||||
*/
|
||||
#define SkScalarMean(a, b) sk_float_sqrt((float)(a) * (b))
|
||||
/** Returns one half of the specified SkScalar
|
||||
*/
|
||||
#define SkScalarHalf(a) ((a) * 0.5f)
|
||||
|
@ -1177,7 +1177,8 @@ SkScalar SkMatrix::mapRadius(SkScalar radius) const {
|
||||
SkScalar d0 = vec[0].length();
|
||||
SkScalar d1 = vec[1].length();
|
||||
|
||||
return SkScalarMean(d0, d1);
|
||||
// return geometric mean
|
||||
return SkScalarSqrt(d0 * d1);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user