Skip to content

Commit d576050

Browse files
committed
add FEW warning to aray()
1 parent 3d173f9 commit d576050

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/math/p5.Vector.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2701,10 +2701,14 @@ class Vector {
27012701
* let v = createVector(20, 30);
27022702
*
27032703
* // Prints "[20, 30]" to the console.
2704-
* print(v.values);
2704+
* print(v.array());
27052705
* }
27062706
*/
27072707
array() {
2708+
this._friendlyError(
2709+
'To get the contents of a vector v, use v.values. In future versions, v.array() may be deprecated.()',
2710+
'p5.Vector.array()'
2711+
);
27082712
return [this.x || 0, this.y || 0, this.z || 0];
27092713
}
27102714

0 commit comments

Comments
 (0)