Repository navigation
|
Is it for performance? I know Py5Vector implementation uses NumPy arrays inside, and an np.array object also has a Just curious... |
Answered by
hx2A
Nov 21, 2024
Replies: 1 comment
|
I did that to simplify the coding when you need to do something with a copy. For example, if |
0 replies
Answer selected by
villares
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.