Py5Vector.copy

Py5Vector.copy#

Create an identical copy of this Py5Vector instance.

Examples#

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

print(v1)
# Py5Vector3D([1., 2., 3.])

v2 = 10 * v1.copy

print(v1)
# Py5Vector3D([1., 2., 3.])
print(v2)
# Py5Vector3D([10., 20., 30.])

Description#

Create an identical copy of this Py5Vector instance.

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