You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While not a factual error, it seems curious to me that v2 would be instantiated as a new PVector only to be assigned the result of v1.copy(). If .copy() creates a returns a new PVector object, then the initial assignment would have no effect. This led to some confusion amongst my students who had various incorrect assumptions about how .copy() works given the example code.
Select the type of content error.
Other content error (please specify)
Section
Examples
Location of the error
https://processing.org/reference/PVector_copy_.html
Describe the error
In the documentation for the
copy()
method of thePVector
class, the following code example is given:While not a factual error, it seems curious to me that
v2
would be instantiated as a newPVector
only to be assigned the result ofv1.copy()
. If.copy()
creates a returns a newPVector
object, then the initial assignment would have no effect. This led to some confusion amongst my students who had various incorrect assumptions about how.copy()
works given the example code.Suggested correction
Language
No response
Screenshots or references
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: