Skip to content

Commit 5c906c2

Browse files
authored
Merge pull request #7324 from asukaminato0721/vec-dist-doc
add usage of dist
2 parents 816b4c3 + a552c9e commit 5c906c2

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, v2));
16991699
* text(m, 50, 75);
17001700
* }
17011701
*

0 commit comments

Comments
 (0)