-
|
Is it for performance? I know Py5Vector implementation uses NumPy arrays inside, and an np.array object also has a Just curious... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I did that to simplify the coding when you need to do something with a copy. For example, if |
Beta Was this translation helpful? Give feedback.
I did that to simplify the coding when you need to do something with a copy. For example, if
v1 = PyVector(1, 2, 3), then you can accessv1.copy.rotate(py5.PI / 2, dim=1)without rotatingv1. I guess it wouldn't have been too much trouble if you needed to also include the()but this makes the code a bit easier to type and is similar tonorm, which works the same way.