normalize
Returns a normalized version of the float2 vector x by scaling it by 1 / length(x).
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
normalize(float2)
Returns a normalized version of the float2 vector x by scaling it by 1 / length(x).
public static float2 normalize(float2 x)
Parameters
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).
public static float3 normalize(float3 x)
Parameters
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).
public static float4 normalize(float4 x)
Parameters
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).
public static double2 normalize(double2 x)
Parameters
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).
public static double3 normalize(double3 x)
Parameters
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).
public static double4 normalize(double4 x)
Parameters
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).
public static quaternion normalize(quaternion q)
Parameters
The quaternion to normalize.
Returns
Type | Description |
|---|---|
| quaternion | The normalized quaternion. |