Skip to content

Commit 63f2730

Browse files
committed
Document vector3:distance
1 parent 84dbbce commit 63f2730

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/Runtime Environment/Vector3.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ print(#vec) --> 3.7416573867739
5454
print(vec:magnitude()) --> 3.7416573867739
5555
```
5656

57+
### `distance`
58+
59+
Calculates the distance between this vector and another provided instance.
60+
61+
```pluto
62+
local { vector3 } = require "*"
63+
print(vector3(0, 0, 0):distance(vector3(1, 0, 1))) --> 1.4142135623731
64+
```
65+
5766
### `sum`
5867

5968
Computes the sum of the `x`, `y` and `z` fields.

0 commit comments

Comments
 (0)