BIS fnc vectorDivide: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Math(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|Multiplayer Effects(...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function| arma3|1.00|gr1= Vectors| Divides vector by scalar, by dividing all vector elements. | ||
| arma3 | |||
|1.00 | |||
|gr1= Vectors | |||
| Divides vector by scalar, by dividing all vector elements. | |||
{{Informative | [[vectorMultiply]] can be used instead as {{Inline code|vector [[vectorMultiply]] 1/scale}}, but: | {{Informative | [[vectorMultiply]] can be used instead as {{Inline code|vector [[vectorMultiply]] 1/scale}}, but: | ||
* ''scale'' cannot be 0 | * ''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.}} | * 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.}}| [vector, divider] call [[BIS_fnc_vectorDivide]]|p1= vector: [[Array]] of [[Number]]s - (Optional, default [0,0,0]) can be any array of numbers.|p2= divider: [[Number]] - (Optional, default 1) | ||
| [vector, divider] call [[BIS_fnc_vectorDivide]] | |||
|p1= vector: [[Array]] of [[Number]]s - (Optional, default [0,0,0]) can be any array of numbers. | |||
|p2= divider: [[Number]] - (Optional, default 1) | |||
| [[vectorMultiply]] [[BIS_fnc_vectorMultiply]] |See also= | | [[Array]] of [[Number]]s|x1= <code>[<nowiki/>[123, 456, 789], 5] [[call]] [[BIS_fnc_vectorDivide]];</code>|x2= <code>[<nowiki/>[1, 2, 3, 4, 5, 6, 7, 8, 9], 5] [[call]] [[BIS_fnc_vectorDivide]];</code>| [[vectorMultiply]] [[BIS_fnc_vectorMultiply]] |See also= | ||
}} | }} |
Revision as of 09:58, 18 January 2021
Description
- Description:
- Divides vector by scalar, by dividing all vector elements.
- Execution:
- call
- Groups:
- Vectors
Syntax
- Syntax:
- [vector, divider] call BIS_fnc_vectorDivide
- Parameters:
- vector: Array of Numbers - (Optional, default [0,0,0]) can be any array of numbers.
- divider: Number - (Optional, default 1)
- Return Value:
- Array of Numbers
Examples
- Example 1:
[[123, 456, 789], 5] call BIS_fnc_vectorDivide;
- Example 2:
[[1, 2, 3, 4, 5, 6, 7, 8, 9], 5] call BIS_fnc_vectorDivide;
Additional Information
- See also:
- vectorMultiply BIS_fnc_vectorMultiply
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