# Normalize

> Returns a normalized vector based on the given vector. The normalized vector has a Vector4.magnitude of 1 and is in the same direction as the given vector. Returns a zero vector if the given vector is too small to be normalized.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## Normalize(Vector4)

Returns a normalized vector based on the given vector. The normalized vector has a [Vector4.magnitude](/engine/6000.7/script-reference/unityengine/vector4/magnitude.md) of 1 and is in the same direction as the given vector. Returns a zero vector if the given vector is too small to be normalized.

```csharp
public static Vector4 Normalize(Vector4 a)
```

### Parameters

**** (\[Vector4]\(/engine/6000.7/script-reference/unityengine/vector4)): The vector to be normalized.

### Returns

| Type                                                              | Description                                                                              |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [Vector4](/engine/6000.7/script-reference/unityengine/vector4.md) | A new vector with the same direction as the original vector but with a magnitude of 1.0. |

### Remarks

Note that this does not modify the given vector. To modify and normalize the current vector, use the [Vector4.Normalize](/engine/6000.7/script-reference/unityengine/vector4/normalize.md) function without a parameter.

Additional Resources: [Vector4.normalized](/engine/6000.7/script-reference/unityengine/vector4/normalized.md) function.

## Normalize(Vector4)

Returns a normalized vector based on the given vector. The normalized vector has a [Vector4.magnitude](/engine/6000.7/script-reference/unityengine/vector4/magnitude.md) of 1 and is in the same direction as the given vector. Returns a zero vector if the given vector is too small to be normalized.

```csharp
public static Vector4 Normalize(in Vector4 a)
```

### Parameters

**** (\[Vector4]\(/engine/6000.7/script-reference/unityengine/vector4)): The vector to be normalized.

### Returns

| Type                                                              | Description                                                                              |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [Vector4](/engine/6000.7/script-reference/unityengine/vector4.md) | A new vector with the same direction as the original vector but with a magnitude of 1.0. |

### Remarks

Note that this does not modify the given vector. To modify and normalize the current vector, use the [Vector4.Normalize](/engine/6000.7/script-reference/unityengine/vector4/normalize.md) function without a parameter.

Additional Resources: [Vector4.normalized](/engine/6000.7/script-reference/unityengine/vector4/normalized.md) function.

## Normalize()

Makes this vector have a [Vector4.magnitude](/engine/6000.7/script-reference/unityengine/vector4/magnitude.md) of 1.

```csharp
public void Normalize()
```

### Remarks

When normalized, a vector keeps the same direction but its length is 1.0.

Note that this function will change the current vector. If you want to keep the current vector unchanged, use [Vector4.normalized](/engine/6000.7/script-reference/unityengine/vector4/normalized.md) variable.

If this vector is too small to be normalized it will be set to zero.

Additional Resources: [Vector4.normalized](/engine/6000.7/script-reference/unityengine/vector4/normalized.md) property.
