---
name: "BIS_fnc_unitVector"
type: function
status: ok
groups: ["Vectors"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_unitVector
revid: 280851
updated: 2021-06-14T08:22:30Z
---

# BIS_fnc_unitVector

*Function · Vectors · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Unit Vector

Returns the unit vector for the passed vector (vector pointing in the same direction, but with magnitude == 1) This does not modify the original array. The array can have any number of elements (2, 3, etc).

## Syntax

**Returns:** 

## Function header

The comment at the top of the function's file in the game; this page's description come from it.

```sqf
/*
    Unit Vector

Returns the unit vector for the passed vector (vector pointing
in the same direction, but with magnitude == 1)
This does not modify the original array.
The array can have any number of elements (2, 3, etc).
*/
```

<sub>Source: [BI Community Wiki — BIS fnc unitVector](https://community.bistudio.com/wiki/BIS_fnc_unitVector) (revision 280851).</sub>
