Distance
Calculates the distance between two given vectors.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
Distance(Vector3Int, Vector3Int)
Calculates the distance between two given vectors.
public static float Distance(Vector3Int a, Vector3Int b)
Parameters
Returns
Type | Description |
|---|---|
| float | The distance between |
Remarks
Vector3Int.Distance(a,b)(a-b).magnitudeDistance(Vector3Int, Vector3Int)
Calculates the distance between two given vectors.
public static float Distance(in Vector3Int a, in Vector3Int b)
Parameters
Returns
Type | Description |
|---|---|
| float | The distance between |
Remarks
Vector3Int.Distance(a,b)(a-b).magnitude