Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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

float2The 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

float3The 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

float4The 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

double2The 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

double3The 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

double4The 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

quaternionThe normalized quaternion.