def center_to_minmax_2d(centers, dims, origin=0.5):
    if (origin == 0.5):
        return center_to_minmax_2d_0_5(centers, dims)
    corners = center_to_corner_box2d(centers, dims, origin=origin)
    return corners[:, [0, 2]].reshape([(- 1), 4])
def center_to_minmax_2d(centers, dims, origin=0.5):
    if (origin == 0.5):
        return center_to_minmax_2d_0_5(centers, dims)
    corners = center_to_corner_box2d(centers, dims, origin=origin)
    return corners[:, [0, 2]].reshape([(- 1), 4])