ORDERED_PAIR_XY_INVERT
The ORDERED_PAIR_XY_INVERT node returns the OrderedPair where the axes are inverted.Params:default : OrderedPairThe input OrderedPair that we would like to invert the axes.Returns:out : OrderedPairThe OrderedPair that is inverted.
Python Code
from flojoy import flojoy, OrderedPair
@flojoy
def ORDERED_PAIR_XY_INVERT(
    default: OrderedPair,
) -> OrderedPair:
    """The ORDERED_PAIR_XY_INVERT node returns the OrderedPair where the axes are inverted.
    Parameters
    ----------
    default : OrderedPair
        The input OrderedPair that we would like to invert the axes.
    Returns
    -------
    OrderedPair
        The OrderedPair that is inverted.
    """
    return OrderedPair(x=default.y, y=default.x)
Example
Having problem with this example app? Join our Discord community and we will help you out!
In this example, generate a OrderedPair type using VECTOR_2_ORDERED_PAIR node.
Use ORDERED_PAIR_XY_INVERT to invert the X and Y axes of the generated output.
Compare the nodes that is not inverted and inverted using visualization node.