{"name":"BIS_fnc_vectorDiff","title":"BIS fnc vectorDiff","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_vectorDiff","revid":327961,"updated":"2022-07-13T13:36:27Z","groups":["Vectors"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a vector that is the difference between two vectors.\n\n> [!NOTE]\n> **Arma 3:** Use vectorDiff instead.","syntaxes":[{"syntax":"[vector1, vector2] call BIS_fnc_vectorDiff","params":[{"name":"vector1","type":"Array","type_expr":"Array"},{"name":"vector2","type":"Array","type_expr":"Array"}],"returns":{"type":"Array","type_expr":"Array","description":"vector difference"}}],"examples":[{"code":["private _vectorDiff = [[1,2,3], [5,6,7]] call BIS_fnc_vectorDiff;"]}],"see_also":["vectorDiff"],"notes":[{"user":"KingArthur98","date":"2020-11-03T07:42:00Z","text":"Note that this function is unreliable in Arma 2 and gives different outputs than the same function on Arma 3 OR the native vectorDiff Arma 3 command.\nIf you want to be sure, replace this function with a manual calculation in Arma 2."}]}