BIS fnc vectorMultiply: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (description)
(Page filling)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Multiplies 3D vector by a scalar. {{Feature arma3|Use [[vectorMultiply]] instead.}}|Description=
/************************************************************
____________________________________________________________________________________________
Vector Multiply


Operand types:
| [vector, factor] call [[BIS_fnc_vectorMultiply]] |Syntax=
<vector1>: array
<scale>: number
<resultant vector>: array


Returns a unit vector that 'points' from <vector1> to <vector2>.
|p1= vector: [[Array]] of [[Number|Numbers]] - to format [x,y,z] |Parameter 1=
This is a very useful function, as it can be used with the velocity
command to move an object from one position to another.
(ie <vector1> to <vector2>) - ensure both positions are found using getposasl.


<resultant vector> = [<vector>,<scale>] call BIS_fnc_vectorMultiply
|p2= factor: [[Number]] |Parameter 2=
************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small>
| [[Array]] of [[Number|Numbers]] - result vector |Return value=
{{Feature arma3|Use [[vectorMultiply]] instead.}} |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_vectorMultiply]]; --> |= Syntax
|x1= <code>_newVector = <nowiki>[</nowiki>[1,2,3], 3] [[call]] [[BIS_fnc_vectorMultiply]]; {{codecomment|// returns [3,6,9]}}</code> |Example 1=
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=
| [[vectorMultiply]] |See also=
____________________________________________________________________________________________
 
| [[vectorMultiply]] |= See also
 
}}
}}


Line 51: Line 33:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:vectorMultiply}}]]
[[Category:Function Group: Vectors|{{uc:vectorMultiply}}]]
[[Category:Function Group: Vectors|{{uc:vectorMultiply}}]]
[[Category:Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:vectorMultiply}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:vectorMultiply}}]]

Revision as of 13:42, 4 June 2018

Hover & click on the images for description

Description

Description:
Multiplies 3D vector by a scalar.
Arma 3
Use vectorMultiply instead.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[vector, factor] call BIS_fnc_vectorMultiply
Parameters:
vector: Array of Numbers - to format [x,y,z]
factor: Number
Return Value:
Array of Numbers - result vector

Examples

Example 1:
_newVector = [[1,2,3], 3] call BIS_fnc_vectorMultiply; // returns [3,6,9]

Additional Information

See also:
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

Notes

Bottom Section