def invert_point(point, invert_x, invert_y):
    """Return point with inverted coordinates as requested.

    Inverting a coordinates means changing the signal.

    point
        A list or tuple with two integers representing
        x and y coordinates of a point.
    invert_x
    invert_y
        Booleans indicating whether the x and y coordinates
        should be inverted, respectively.

    >>> invert_point((10, 10), True, True)
    (-10, -10)
    >>> invert_point((10, 10), True, False)
    (-10, 10)
    >>> invert_point((10, 10), False, True)
    (10, -10)
    >>> invert_point((10, 10), False, False)
    (10, 10)
    """
    x, y = point
    new_x = -x if invert_x else x
    new_y = -y if invert_y else y
    inverted_point = (new_x, new_y)

    return inverted_point
Return point with inverted coordinates as requested.

    Inverting a coordinates means changing the signal.

    point
        A list or tuple with two integers representing
        x and y coordinates of a point.
    invert_x
    invert_y
        Booleans indicating whether the x and y coordinates
        should be inverted, respectively.

    >>> invert_point((10, 10), True, True)
    (-10, -10)
    >>> invert_point((10, 10), True, False)
    (-10, 10)
    >>> invert_point((10, 10), False, True)
    (10, -10)
    >>> invert_point((10, 10), False, False)
    (10, 10)
    
nodezator/ourstdlibs/mathutils.py