We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34eecd8 commit 9393751Copy full SHA for 9393751
1 file changed
src/math/math.js
@@ -109,10 +109,10 @@ function math(p5, fn) {
109
'Calling createVector() with no arguments is deprecated and will be removed in a future release. Pass zeros for the desired dimensionality.'
110
);
111
}
112
-
+ this.dimension = arguments.length;
113
const safeArgs =
114
- arguments.length === 1 ? [x ?? 0, 0, 0]
115
- : arguments.length === 2 ? [x ?? 0, y ?? 0, 0]
+ arguments.length === 1 ? [x, 0, 0]
+ : arguments.length === 2 ? [x, y, 0]
116
: [...arguments];
117
118
if (this instanceof p5) {
0 commit comments