distancesq
Returns the squared distance between two float values.
Read time 2 minutesLast updated 13 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
distancesq(float, float)
Returns the squared distance between two float values.
public static float distancesq(float x, float y)
Parameters
Returns
Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float2, float2)
Returns the squared distance between two float2 vectors.
public static float distancesq(float2 x, float2 y)
Parameters
Returns
Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float3, float3)
Returns the squared distance between two float3 vectors.
public static float distancesq(float3 x, float3 y)
Parameters
Returns
Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float4, float4)
Returns the squared distance between two float4 vectors.
public static float distancesq(float4 x, float4 y)
Parameters
Returns
Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(double, double)
Returns the squared distance between two double values.
public static double distancesq(double x, double y)
Parameters
Returns
Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double2, double2)
Returns the squared distance between two double2 vectors.
public static double distancesq(double2 x, double2 y)
Parameters
Returns
Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double3, double3)
Returns the squared distance between two double3 vectors.
public static double distancesq(double3 x, double3 y)
Parameters
Returns
Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double4, double4)
Returns the squared distance between two double4 vectors.
public static double distancesq(double4 x, double4 y)
Parameters
Returns
Type | Description |
|---|---|
| double | The squared distance between x and y. |