| Index: cc/CCMathUtil.cpp
|
| diff --git a/cc/CCMathUtil.cpp b/cc/CCMathUtil.cpp
|
| index d90eb090abef6fbc004f87cedc0a3188419486cf..0a2b2070179c2afbfd2cddd70b62127a228aadc9 100644
|
| --- a/cc/CCMathUtil.cpp
|
| +++ b/cc/CCMathUtil.cpp
|
| @@ -9,6 +9,7 @@
|
| #include "FloatPoint.h"
|
| #include "FloatQuad.h"
|
| #include "IntRect.h"
|
| +#include <math.h>
|
| #include <public/WebTransformationMatrix.h>
|
|
|
| using WebKit::WebTransformationMatrix;
|
| @@ -376,4 +377,9 @@ FloatSize CCMathUtil::projectVector(const FloatSize& source, const FloatSize& de
|
| return FloatSize(projectedLength * destination.width(), projectedLength * destination.height());
|
| }
|
|
|
| +float CCMathUtil::distanceBetweenPoints(const FloatPoint& p1, const FloatPoint& p2)
|
| +{
|
| + return sqrtf((p1.x() - p2.x()) * (p1.x() - p2.x()) + (p1.y() - p2.y()) * (p1.y() - p2.y()));
|
| +}
|
| +
|
| } // namespace cc
|
|
|