---
name: "vectorNormalized"
type: command
status: ok
groups: ["Math - Vectors"]
arma3_since: "1.26"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/vectorNormalized
revid: 378403
updated: 2026-04-04T08:14:40Z
---

# vectorNormalized

*Command · Math - Vectors · Arma 3 v1.26*

## Description

Returns normalised vector (unit vector, [vectorMagnitude](../commands/vectorMagnitude.md) == 1) of given vector. If given vector is 0 result is a 0 vector as well.

> [!NOTE]
> - Arma 3 v2.14 any count of numbers is valid
> - Arma 3 v2.00 now supports Vector2D (z defaulted to 0)
> - Arma 3 v1.26 command introduction, only works with [Vector3D](../topics/Vector3D.md)

## Syntax

```sqf
vectorNormalized vector
```

**Parameters:**

- `vector`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s

**Returns:** [Vector3D](../topics/Vector3D.md)

## Examples

### Example 1

```sqf
vectorNormalized [12345,7890,38383]; // [0.300481,0.192045,0.934254]
vectorMagnitude [0.300481,0.192045,0.934254]; // 1
```

## See also

[vectorDiff](../commands/vectorDiff.md) · [vectorCrossProduct](../commands/vectorCrossProduct.md) · [vectorDotProduct](../commands/vectorDotProduct.md) · [vectorCos](../commands/vectorCos.md) · [vectorMagnitude](../commands/vectorMagnitude.md) · [vectorMagnitudeSqr](../commands/vectorMagnitudeSqr.md) · [vectorMultiply](../commands/vectorMultiply.md) · [vectorDistance](../commands/vectorDistance.md) · [vectorDistanceSqr](../commands/vectorDistanceSqr.md) · [vectorDir](../commands/vectorDir.md) · [vectorUp](../commands/vectorUp.md) · [setVectorDir](../commands/setVectorDir.md) · [setVectorUp](../commands/setVectorUp.md) · [setVectorDirAndUp](../commands/setVectorDirAndUp.md) · [vectorFromTo](../commands/vectorFromTo.md) · [matrixMultiply](../commands/matrixMultiply.md) · [matrixTranspose](../commands/matrixTranspose.md)

## Community notes

**ffur2007slx2_5** — 2014-07-19

Arma 3 v1.26 Algorithm:

```sqf
_vector = [x,y,z];
_result = [x / (sqrt (x ^ 2 + y ^ 2 + z ^ 2)), y / (sqrt (x ^ 2 + y ^ 2 + z ^ 2)), z / (sqrt (x ^ 2 + y ^ 2 + z ^ 2))];
```

In mathematics, a unit vector in a normed vector space is a vector whose length is 1.

<sub>Source: [BI Community Wiki — vectorNormalized](https://community.bistudio.com/wiki/vectorNormalized) (revision 378403).</sub>
