Method normalize
normalize(float2)
Returns a normalized version of the float2 vector x by scaling it by 1 / length(x).
Declaration
public static float2 normalize(float2 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| float2 | The normalized vector. |
normalize(float3)
Returns a normalized version of the float3 vector x by scaling it by 1 / length(x).
Declaration
public static float3 normalize(float3 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| float3 | The normalized vector. |
normalize(float4)
Returns a normalized version of the float4 vector x by scaling it by 1 / length(x).
Declaration
public static float4 normalize(float4 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| float4 | The normalized vector. |
normalize(double2)
Returns a normalized version of the double2 vector x by scaling it by 1 / length(x).
Declaration
public static double2 normalize(double2 x)
Parameters
| Type | Name | Description |
|---|---|---|
| double2 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| double2 | The normalized vector. |
normalize(double3)
Returns a normalized version of the double3 vector x by scaling it by 1 / length(x).
Declaration
public static double3 normalize(double3 x)
Parameters
| Type | Name | Description |
|---|---|---|
| double3 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| double3 | The normalized vector. |
normalize(double4)
Returns a normalized version of the double4 vector x by scaling it by 1 / length(x).
Declaration
public static double4 normalize(double4 x)
Parameters
| Type | Name | Description |
|---|---|---|
| double4 | x | Vector to normalize. |
Returns
| Type | Description |
|---|---|
| double4 | The normalized vector. |
normalize(quaternion)
Returns a normalized version of a quaternion q by scaling it by 1 / length(q).
Declaration
public static quaternion normalize(quaternion q)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | q | The quaternion to normalize. |
Returns
| Type | Description |
|---|---|
| quaternion | The normalized quaternion. |