VectorMag
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | VectorMag | |
| Function Description: | Calculates the magnitude of a 3D vector using the Euclidean norm formula, returning the square root of the sum of squared components. | |
| File Location: | cmm.positionFunctions.lua | |
| Syntax: | CMM.VectorMag( table VM ) | |
| Return Value: | number | |
| Parameters: | Name | Description |
| VM | {x <number>, y <number>, z <number>} – 3D vector with x, y, and z components. | |
| Example: | CMM.VectorMag({x=3, y=4, z=0}) | |
| Example Description: | Computes the magnitude of a 3D vector with components 3, 4, and 0, returning 5.0. | |
| Related Functions: | ||
| Notes: | ||