4 ms·
It seems like it's the loop itself that is redundant. Why couldn't I just do: squaredVec = vec * vec or squaredVec = vec ^ 2
by geocar 13y ago
It seems like it's the loop itself that is redundant. Why couldn't I just do:
squaredVec = vec * vec
or
squaredVec = vec ^ 2
- bstamour 13y agoYou can, but not with vector. Use valarray if you need to perform those kinds of computations.