Py5Vector.w#

The vector’s w dimension value.

Examples#

 1v = py5.Py5Vector(1, 2, 3, 4)
 2
 3print(v.x, v.y, v.z, v.w)
 4# 1.0, 2.0, 3.0, 4.0
 5
 6v.x = 0
 7v.y += 10
 8v.z += 100
 9v.w += 1000
10
11print(v.x, v.y, v.z, v.w)
12# 0.0, 12.0, 103.0, 1004.0

Description#

The vector’s w dimension value. This is the vector’s 4th dimension, and is only applicable to 4D vectors.

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