GetRangeBearing
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | GetRangeBearing | |
| Function Description: | Calculates the range and bearing between two points in world space, returning a table with range in meters and bearing in degrees from north. | |
| File Location: | cmm.positionFunctions.lua | |
| Syntax: | CMM.GetRangeBearing( table InitialVec , table DestinationVec ) | |
| Return Value: | table | |
| Parameters: | Name | Description |
| InitialVec | Origin vector with x, y, and z components representing the starting position in world space. | |
| DestinationVec | Destination vector with x, y, and z components representing the target position in world space. | |
| Example: | CMM.GetRangeBearing({x=100, y=50, z=10}, {x=200, y=100, z=20}) | |
| Example Description: | Returns a table with range 141.42 meters and bearing 45 degrees, indicating the distance and direction from the origin to the destination point. | |
| Related Functions: | ||
| Notes: | ||