vectorNormalized

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.26
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.26

Description

Description:
Returns normalized vector (unit vector, vectorMagnitude == 1) of given vector. If given vector is 0 result is a 0 vector as well.

Syntax

Syntax:
vectorNormalized vector
Parameters:
vector: Array
Return Value:
Array

Examples

Example 1:
vectorNormalized [12345,7890,38383]; //[0.300481,0.192045,0.934254] vectorMagnitude [0.300481,0.192045,0.934254]; //1

Additional Information

Multiplayer:
-
See also:
vectorDiffvectorCrossProductvectorDotProductvectorCosvectorMagnitudevectorMagnitudeSqrvectorMultiplyvectorDistancevectorDistanceSqrvectorDirvectorUpsetVectorDirsetVectorUpsetVectorDirAndUpvectorFromTo

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted on 19 Jul, 2014
ffur2007slx2_5
(ArmA3 1.26) Algorithm: Vector = [x,y,z]; Result = [x/(sqrt (x ^ 2 + y ^ 2 + z ^ 2)), y/(sqrt (x ^ 2 + y ^ 2 + z ^ 2)), z/(sqrt (x ^ 2 + y ^ 2 + z ^ 2))] In mathematics, a unit vector in a normed vector space is a vector whose length is 1.

Bottom Section