ORDERED_PAIR_2_VECTOR
The ORDERED_PAIR_2_VECTOR return the y component of an ordered pair as a Vector.Params:default : OrderedPairThe input OrderedPair.Returns:out : VectorThe y component of the input OrderedPair.
Python Code
from flojoy import flojoy, Vector, OrderedPair
@flojoy
def ORDERED_PAIR_2_VECTOR(default: OrderedPair) -> Vector:
"""The ORDERED_PAIR_2_VECTOR return the y component of an ordered pair as a Vector.
Parameters
----------
default : OrderedPair
The input OrderedPair.
Returns
-------
Vector
The y component of the input OrderedPair.
"""
return Vector(v=default.y)
Example
Having problem with this example app? Join our Discord community and we will help you out!
This example shows the function of the ORDERED_PAIR_2_VECTOR node. It changes an Ordered Pair
into a Vector
. Specifcally, the x axis is removed and the y axis is used as the vector.