Skip to content

Commit db133f6

Browse files
add usage of dist
1 parent 78c4442 commit db133f6

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
@@ -1694,8 +1694,8 @@ p5.Vector = class {
16941694
* // Style the text.
16951695
* textAlign(CENTER);
16961696
*
1697-
* // Display the magnitude.
1698-
* let m = floor(v3.mag());
1697+
* // Display the magnitude. The same as floor(v3.mag());
1698+
* let m = floor(p5.Vector.dist(v1, v3));
16991699
* text(m, 50, 75);
17001700
* }
17011701
*

0 commit comments

Comments
 (0)