vectorMagnitudeSqr: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dt class="note">'''\[\[.*\]\]'''" to "<dt class="note">$1") |
Lou Montana (talk | contribs) m (Fix username deletion mistake) |
||
Line 5: | Line 5: | ||
|1.22|Game version= | |1.22|Game version= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 11: | Line 10: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[vectorMagnitudeSqr]] vector |SYNTAX= | ||
|p1= vector: [[Array]] |PARAMETER1= | |p1= vector: [[Array]] |PARAMETER1= | ||
Line 18: | Line 17: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_sizeSqr = [[vectorMagnitudeSqr]] [0,3,4]; | |x1= <code>_sizeSqr = [[vectorMagnitudeSqr]] [0,3,4]; {{cc|returns 25}}</code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[vectorAdd]], [[vectorDiff]], [[vectorCrossProduct]], [[vectorDotProduct]], [[vectorCos]], [[vectorMagnitude]], [[vectorMultiply]], [[vectorDistance]], [[vectorDistanceSqr]], [[vectorDir]], [[vectorUp]], [[setVectorDir]], [[setVectorUp]], [[setVectorDirAndUp]], [[vectorNormalized]], [[vectorFromTo]] |SEEALSO= | | [[vectorAdd]], [[vectorDiff]], [[vectorCrossProduct]], [[vectorDotProduct]], [[vectorCos]], [[vectorMagnitude]], [[vectorMultiply]], [[vectorDistance]], [[vectorDistanceSqr]], [[vectorDir]], [[vectorUp]], [[setVectorDir]], [[setVectorUp]], [[setVectorDirAndUp]], [[vectorNormalized]], [[vectorFromTo]] |SEEALSO= | ||
}} | }} | ||
Line 29: | Line 27: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on 28 Jun, 2014 | <dd class="notedate">Posted on 28 Jun, 2014 | ||
<dt class="note">[[]]<dd class="note"> | <dt class="note">[[User:ffur2007slx2_5| ffur2007slx2_5]] | ||
(ArmA3 1.22)Algorithm: | <dd class="note"> | ||
<code> | (ArmA3 1.22) Algorithm: | ||
Vector = [x,y,z]; | <code>Vector = [x,y,z]; | ||
Result = (x ^ 2) + (y ^ 2) + (z ^ 2) | Result = (x ^ 2) + (y ^ 2) + (z ^ 2);</code> | ||
</code> | |||
It is recommended to use [[vectorMagnitudeSqr]] instead of [[BIS_fnc_magnitudeSqr]]. | It is recommended to use [[vectorMagnitudeSqr]] instead of [[BIS_fnc_magnitudeSqr]]. | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
Line 40: | Line 37: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
Revision as of 18:57, 19 May 2020
Description
- Description:
- Squared magnitude of a 3D vector.
- Groups:
- Uncategorised
Syntax
- Syntax:
- vectorMagnitudeSqr vector
- Parameters:
- vector: Array
- Return Value:
- Number
Examples
- Example 1:
_sizeSqr = vectorMagnitudeSqr [0,3,4]; // returns 25
Additional Information
- See also:
- vectorAddvectorDiffvectorCrossProductvectorDotProductvectorCosvectorMagnitudevectorMultiplyvectorDistancevectorDistanceSqrvectorDirvectorUpsetVectorDirsetVectorUpsetVectorDirAndUpvectorNormalizedvectorFromTo
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
- Posted on 28 Jun, 2014
- ffur2007slx2_5
-
(ArmA3 1.22) Algorithm:
Vector = [x,y,z]; Result = (x ^ 2) + (y ^ 2) + (z ^ 2);
It is recommended to use vectorMagnitudeSqr instead of BIS_fnc_magnitudeSqr.