     return p1.x == p2.x && p1.y == p2.y
 }
 
-func isEqual(p1: CGPoint, p2: CGPoint, withPrecision precision:CGFloat) -> Bool
+public func isEqual(p1: CGPoint, p2: CGPoint, withPrecision precision:CGFloat) -> Bool
 {
     return distanceFrom(p1, to:p2) < abs(precision)
 }

    public func distanceTo(point: CGPoint) -> CGFloat
    {
        return sqrt(pow(x - point.x, 2) + pow(y - point.y, 2))
    }
    
    // MARK: rotation


}

public func distanceFrom(p1:CGPoint, to p2:CGPoint) -> CGFloat
{
    return sqrt(pow((p2.x - p1.x), 2) + pow((p2.y - p1.y), 2))
}

public func midPoint(between p1:CGPoint, and p2:CGPoint) -> CGPoint
{
    return CGPoint((p1.x + p2.x) / 2.0, (p1.y + p2.y) / 2.0)
}
