World / Server
paper/distance
Distance
Calculates the distance between two locations.
Note: Locations must be in the same world. Cross-world distance returns 0.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
locationA |
location | First location. | |
locationB |
location | Second location. |
Outputs
| Name | Type | Description |
|---|---|---|
distance |
number | Euclidean distance. |
distanceSquared |
number | Squared distance (cheaper to compute). |