BIS fnc vectorDivide: Difference between revisions
Jump to navigation
Jump to search
m (infobox to template) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Function|= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 5: | Line 5: | ||
|1.00|Game version= | |1.00|Game version= | ||
| Divides vector by scalar, by dividing all vector elements. | |||
{{Informative | [[vectorMultiply]] can be used instead as {{Inline code|vector [[vectorMultiply]] 1/scale}}, but: | |||
* ''scale'' cannot be 0 | |||
* in some rare cases, the result is not ''exactly'' the same as [[BIS_fnc_vectorDivide]] - this is due to [[Floating Point Number]] precision and rounding.}} |Description= | |||
| [vector, divider] call [[BIS_fnc_vectorDivide]] |Syntax= | |||
| | |p1= vector: [[Array]] of [[Number]]s - (Optional, default [0,0,0]) can be any array of numbers. |Parameter 1= | ||
|p2= divider: [[Number]] - (Optional, default 1) | |||
| [[Array]] of [[Number]]s |Return value= | |||
|x1= <code>[[123, 456, 789], 5] [[call]] [[BIS_fnc_vectorDivide]];</code> |Example 1= | |||
|[] call [[BIS_fnc_vectorDivide]]| | |x2= <code>[[1, 2, 3, 4, 5, 6, 7, 8, 9], 5] [[call]] [[BIS_fnc_vectorDivide]];</code> |Example 2= | ||
| | | [[vectorMultiply]] [[BIS_fnc_vectorMultiply]] |See also= | ||
}} | }} | ||
[[Category:Function Group: Math|{{uc:vectorDivide}}]] | [[Category:Function Group: Math|{{uc:vectorDivide}}]] | ||
Revision as of 21:58, 26 June 2020
{{Function|Comments=
| arma3 |Game name=
|1.00|Game version=
| Divides vector by scalar, by dividing all vector elements.
|Description=
| [vector, divider] call BIS_fnc_vectorDivide |Syntax=
|p1= vector: Array of Numbers - (Optional, default [0,0,0]) can be any array of numbers. |Parameter 1=
|p2= divider: Number - (Optional, default 1)
| Array of Numbers |Return value=
|x1= [[123, 456, 789], 5] call BIS_fnc_vectorDivide;
|Example 1=
|x2= [[1, 2, 3, 4, 5, 6, 7, 8, 9], 5] call BIS_fnc_vectorDivide;
|Example 2=
| vectorMultiply BIS_fnc_vectorMultiply |See also= }}