Method length
length(Single)
Returns the length of a float value. Equivalent to the absolute value.
Declaration
public static float length(float x)
Parameters
Type | Name | Description |
---|---|---|
Single | x | Value to use when computing length. |
Returns
Type | Description |
---|---|
Single | Length of x. |
length(float2)
Returns the length of a float2 vector.
Declaration
public static float length(float2 x)
Parameters
Type | Name | Description |
---|---|---|
float2 | x | Vector to use when computing length. |
Returns
Type | Description |
---|---|
Single | Length of vector x. |
length(float3)
Returns the length of a float3 vector.
Declaration
public static float length(float3 x)
Parameters
Type | Name | Description |
---|---|---|
float3 | x | Vector to use when computing length. |
Returns
Type | Description |
---|---|
Single | Length of vector x. |
length(float4)
Returns the length of a float4 vector.
Declaration
public static float length(float4 x)
Parameters
Type | Name | Description |
---|---|---|
float4 | x | Vector to use when computing length. |
Returns
Type | Description |
---|---|
Single | Length of vector x. |
length(Double)
Returns the length of a double value. Equivalent to the absolute value.
Declaration
public static double length(double x)
Parameters
Type | Name | Description |
---|---|---|
Double | x | Value to use when computing squared length. |
Returns
Type | Description |
---|---|
Double | Squared length of x. |
length(double2)
Returns the length of a double2 vector.
Declaration
public static double length(double2 x)
Parameters
Type | Name | Description |
---|---|---|
double2 | x | Vector to use when computing squared length. |
Returns
Type | Description |
---|---|
Double | Squared length of vector x. |
length(double3)
Returns the length of a double3 vector.
Declaration
public static double length(double3 x)
Parameters
Type | Name | Description |
---|---|---|
double3 | x | Vector to use when computing squared length. |
Returns
Type | Description |
---|---|
Double | Squared length of vector x. |
length(double4)
Returns the length of a double4 vector.
Declaration
public static double length(double4 x)
Parameters
Type | Name | Description |
---|---|---|
double4 | x | Vector to use when computing squared length. |
Returns
Type | Description |
---|---|
Double | Squared length of vector x. |
length(quaternion)
Returns the length of a quaternion.
Declaration
public static float length(quaternion q)
Parameters
Type | Name | Description |
---|---|---|
quaternion | q | The input quaternion. |
Returns
Type | Description |
---|---|
Single | The length of the input quaternion. |