         return index
     }
     
-    private static func distanceBetweenPoint(x1 x1: CGFloat, y1: CGFloat, x2: CGFloat, y2: CGFloat) ->  CGFloat {
-        let distance = Double((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
+    private static func distanceBetweenPoint(point1 point1: CGPoint, point2: CGPoint) ->  CGFloat {
+        let distance = Double((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y))
         let squaredDistance = sqrt(distance)
         return CGFloat(squaredDistance)
     }

    }
    
    private func transformView(view: HexagonalItemView) {
        let size = bounds.size
        let zoomScale = zoomScaleCache
        let insets = contentInset
        let spacing = itemAppearance.itemSize + itemAppearance.itemSpacing/2
        
        //convert the ivew rect in the contentView coordinate

        
        views.enumerate().forEach { (viewIndex: Int, view: UIView) -> () in
            let center = view.center
            let potentialDistance = distanceBetweenPoint(point1: center, point2: contentViewCenter)
            
            if potentialDistance < distance || !hasItem {
                hasItem = true
