Py5Vector.dim#

The vector’s dimension.

Examples#

 1v_2d = py5.Py5Vector(1, 2)
 2v_3d = py5.Py5Vector(1, 2, 3)
 3v_4d = py5.Py5Vector(1, 2, 3, 4)
 4
 5print("dim =", v_2d.dim)
 6# dim = 2
 7print("dim =", v_3d.dim)
 8# dim = 3
 9print("dim =", v_4d.dim)
10# dim = 4

Description#

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

Updated on January 16, 2022 16:51:21pm UTC