Method distancesq
distancesq(float, float)
Returns the squared distance between two float values.
Declaration
public static float distancesq(float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | First value to use in distance computation. |
| float | y | Second value to use in distance computation. |
Returns
| Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float2, float2)
Returns the squared distance between two float2 vectors.
Declaration
public static float distancesq(float2 x, float2 y)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | x | First vector to use in distance computation. |
| float2 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float3, float3)
Returns the squared distance between two float3 vectors.
Declaration
public static float distancesq(float3 x, float3 y)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | x | First vector to use in distance computation. |
| float3 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(float4, float4)
Returns the squared distance between two float4 vectors.
Declaration
public static float distancesq(float4 x, float4 y)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | x | First vector to use in distance computation. |
| float4 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| float | The squared distance between x and y. |
distancesq(double, double)
Returns the squared distance between two double values.
Declaration
public static double distancesq(double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | First value to use in distance computation. |
| double | y | Second value to use in distance computation. |
Returns
| Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double2, double2)
Returns the squared distance between two double2 vectors.
Declaration
public static double distancesq(double2 x, double2 y)
Parameters
| Type | Name | Description |
|---|---|---|
| double2 | x | First vector to use in distance computation. |
| double2 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double3, double3)
Returns the squared distance between two double3 vectors.
Declaration
public static double distancesq(double3 x, double3 y)
Parameters
| Type | Name | Description |
|---|---|---|
| double3 | x | First vector to use in distance computation. |
| double3 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| double | The squared distance between x and y. |
distancesq(double4, double4)
Returns the squared distance between two double4 vectors.
Declaration
public static double distancesq(double4 x, double4 y)
Parameters
| Type | Name | Description |
|---|---|---|
| double4 | x | First vector to use in distance computation. |
| double4 | y | Second vector to use in distance computation. |
Returns
| Type | Description |
|---|---|
| double | The squared distance between x and y. |