Py5Vector.dim#

The vector’s dimension.

Examples#

v_2d = py5.Py5Vector(1, 2)
v_3d = py5.Py5Vector(1, 2, 3)
v_4d = py5.Py5Vector(1, 2, 3, 4)

print("dim =", v_2d.dim)
# dim = 2
print("dim =", v_3d.dim)
# dim = 3
print("dim =", v_4d.dim)
# dim = 4

Description#

The vector’s dimension. This will be either 2, 3, or 4.

Updated on September 01, 2022 16:36:02pm UTC