BIS fnc vectorDiff: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{Feature arma3|" to "{{Feature|arma3|") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Vectors |GROUP1= | |gr1= Vectors |GROUP1= | ||
| Returns a vector that is the difference between two vectors. | | Returns a vector that is the difference between two vectors. | ||
{{Feature|arma3|Use [[vectorDiff]] instead.}}|Description= | {{Feature|arma3|Use [[vectorDiff]] instead.}}|Description= | ||
| [vector1, vector2] call [[BIS_fnc_vectorDiff]] |Syntax= | | [vector1, vector2] call [[BIS_fnc_vectorDiff]] |Syntax= | ||
Line 20: | Line 17: | ||
| [[Array]] - vector difference |Return value= | | [[Array]] - vector difference |Return value= | ||
|x1= <code>_vectorDiff = [<nowiki/>[1,2,3], [5,6,7]] [[call]] [[BIS_fnc_vectorDiff]];</code> |Example 1= | |x1= <code>_vectorDiff = [<nowiki/>[1,2,3], [5,6,7]] [[call]] [[BIS_fnc_vectorDiff]];</code> |Example 1= | ||
| [[vectorDiff]] |See also= | | [[vectorDiff]] |See also= |
Revision as of 00:09, 17 January 2021
Description
- Description:
- Returns a vector that is the difference between two vectors.
- Execution:
- call
- Groups:
- Vectors
Syntax
- Syntax:
- [vector1, vector2] call BIS_fnc_vectorDiff
- Parameters:
- vector1: Array
- vector2: Array
- Return Value:
- Array - vector difference
Examples
- Example 1:
_vectorDiff = [[1,2,3], [5,6,7]] call BIS_fnc_vectorDiff;
Additional Information
- See also:
- vectorDiff
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on November 3, 2020 - 07:42 (UTC)
- KingArthur98
-
Note that this function is unreliable in Arma 2 and gives different outputs than the same function on Arma 3 OR the native vectorDiff function in Arma 3.
If you want to be sure, replace this function with a manual calculation in Arma 2.