Method distance
distance(Single, Single)
Returns the distance between two float values.
Declaration
public static float distance(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
Single | x | First value to use in distance computation. |
Single | y | Second value to use in distance computation. |
Returns
Type | Description |
---|---|
Single | The distance between x and y. |
distance(float2, float2)
Returns the distance between two float2 vectors.
Declaration
public static float distance(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 |
---|---|
Single | The distance between x and y. |
distance(float3, float3)
Returns the distance between two float3 vectors.
Declaration
public static float distance(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 |
---|---|
Single | The distance between x and y. |
distance(float4, float4)
Returns the distance between two float4 vectors.
Declaration
public static float distance(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 |
---|---|
Single | The distance between x and y. |
distance(Double, Double)
Returns the distance between two double values.
Declaration
public static double distance(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 distance between x and y. |
distance(double2, double2)
Returns the distance between two double2 vectors.
Declaration
public static double distance(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 distance between x and y. |
distance(double3, double3)
Returns the distance between two double3 vectors.
Declaration
public static double distance(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 distance between x and y. |
distance(double4, double4)
Returns the distance between two double4 vectors.
Declaration
public static double distance(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 distance between x and y. |