Method DistanceTo
DistanceTo(Vector2)
Calculates the distance between two vectors.
Declaration
public float DistanceTo(Vector2 position)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | The second vector to calculate the distance to. |
Returns
| Type | Description |
|---|---|
| System.Single | The distance to the other vector. |