---
name: "BIS_fnc_vectorDiff"
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_vectorDiff
revid: 327961
updated: 2022-07-13T13:36:27Z
---

# BIS_fnc_vectorDiff

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

## Description

Returns a vector that is the difference between two vectors.

> [!NOTE]
> **Arma 3:** Use [vectorDiff](../commands/vectorDiff.md) instead.

## Syntax

```sqf
[vector1, vector2] call BIS_fnc_vectorDiff
```

**Parameters:**

- `vector1`: [Array](../topics/Array.md)
- `vector2`: [Array](../topics/Array.md)

**Returns:** [Array](../topics/Array.md) - vector difference

## Examples

### Example 1

```sqf
private _vectorDiff = [[1,2,3], [5,6,7]] call BIS_fnc_vectorDiff;
```

## See also

[vectorDiff](../commands/vectorDiff.md)

## Community notes

**KingArthur98** — 2020-11-03

Note that this function is unreliable in Arma 2 and gives different outputs than the same function on Arma 3 OR the native [vectorDiff](../commands/vectorDiff.md) Arma 3 command.

If you want to be sure, replace this function with a manual calculation in Arma 2.

<sub>Source: [BI Community Wiki — BIS fnc vectorDiff](https://community.bistudio.com/wiki/BIS_fnc_vectorDiff) (revision 327961).</sub>
