Arma 3 Scripting

vectorMagnitudeSqr

  • Arma 3 v1.22

Command · Markdown · JSON · original wiki page

Description

Squared magnitude of a 3D vector.

Note

Since Arma 3 v2.14: Since Arma 3 v2.14 any count of numbers is valid.

Before Arma 3 v2.14, the argument had to be vector 3D, or Arma 3 v2.00 2D (With z coordinate defaulted to 0)

Syntax

vectorMagnitudeSqr vector

Parameters:

Returns: Number

Examples

Example 1

_sizeSqr = vectorMagnitudeSqr [0,3,4]; // returns 25

See also

vectorAdd · vectorDiff · vectorCrossProduct · vectorDotProduct · vectorCos · vectorMagnitude · vectorMultiply · vectorDistance · vectorDistanceSqr · vectorDir · vectorUp · setVectorDir · setVectorUp · setVectorDirAndUp · vectorNormalized · vectorFromTo