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