         origin = CGPoint(rect.origin)
         size = CGSize(rect.size)
     }
-}
+}
        }
    }

    public func isZero() -> Bool {
        return origin.isZero() && size.isZero()
    }

    public func contains(point: Point) -> Bool {
        return CGRectContainsPoint(CGRect(self), CGPoint(point))
    }
}

public func == (lhs: Rect, rhs: Rect) -> Bool {
    return lhs.origin == rhs.origin && lhs.size == rhs.size
}


// MARK: - Casting to and from CGRect


public extension Rect {
    public init(_ rect: CGRect) {

        size = Size(w,h)
    }

    //MARK: - Mid & Max
    public var center: Point {
        get {
            return Point(origin.x + size.width/2, origin.y + size.height/2)
