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
When calling a static method, instead of referencing an object instance, you reference the name of the class. Here’s the right way to implement the vector addition example:
let v = createVector(0, 0);
let u = createVector(4, 5);
- let w = v.add(u);
let w = p5.Vector.add(v, u);
The text was updated successfully, but these errors were encountered:
Thomascountz
changed the title
Errata: Static vs. Nonstatic Methods Codeblock
Errata: Static Methods Codeblock
Jun 20, 2024
The text was updated successfully, but these errors were encountered: