Method SqrDistance
SqrDistance(Vector3, Vector3)
Returns the squared distance between two points. This is the same as (b - a).sqrMagnitude
.
Declaration
public static float SqrDistance(Vector3 a, Vector3 b)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | First point. |
Vector3 | b | Second point. |
Returns
Type | Description |
---|---|
float | The squared distance between two points. |