Skip to content

Commit db17645

Browse files
authored
Merge pull request #8142 from processing/pr-8118
fromAngle returns a 2D Vector
2 parents f76b2b6 + e2a117e commit db17645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/math/p5.Vector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,7 +3155,7 @@ class Vector {
31553155
if (typeof length === 'undefined') {
31563156
length = 1;
31573157
}
3158-
return new Vector(length * Math.cos(angle), length * Math.sin(angle), 0);
3158+
return new Vector(length * Math.cos(angle), length * Math.sin(angle));
31593159
}
31603160

31613161
/**
@@ -3241,7 +3241,7 @@ class Vector {
32413241
* // Create a p5.Vector object.
32423242
* let v = p5.Vector.random2D();
32433243
*
3244-
* // Prints "p5.Vector Object : [x, y, 0]" to the console
3244+
* // Prints "p5.Vector Object : [x, y]" to the console
32453245
* // where x and y are small random numbers.
32463246
* print(v.toString());
32473247
* }

0 commit comments

Comments
 (0)