Py5Vector.z

Py5Vector.z#

The vector’s z dimension value.

Examples#

v = py5.Py5Vector(1, 2, 3)

print(v.x, v.y, v.z)
# 1.0, 2.0, 3.0

v.x = 0
v.y += 10
v.z += 100

print(v.x, v.y, v.z)
# 0.0, 12.0, 103.0

Description#

The vector’s z dimension value. This is the vector’s 3rd dimension, and is only applicable to 3D and 4D vectors.

Updated on March 06, 2023 02:49:26am UTC