Point2D equals optimization