Method DistanceSquared
DistanceSquared(Vector2, Vector2)
Calculates the squared distance between two vectors.
Declaration
public static float DistanceSquared(Vector2 position1, Vector2 position2)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position1 | The first vector to calculate the squared distance to the second vector. |
Vector2 | position2 | The second vector to calculate the squared distance to the first vector. |
Returns
Type | Description |
---|---|
System.Single | The squared distance between the two vectors. |