ValidateDir
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | ValidateDir | |
| Function Description: | Validates a direction value in degrees by normalizing it to the range [0, 360), adjusting negative values by adding 360 and values above 360 by subtracting 360. | |
| File Location: | cmm.positionFunctions.lua | |
| Syntax: | CMM.ValidateDir( number Dir ) | |
| Return Value: | number | |
| Parameters: | Name | Description |
| Dir | Direction in degrees; if negative, is adjusted to positive; if greater than or equal to 360, is reduced to within [0, 360). | |
| Example: | CMM.ValidateDir(-45) | |
| Example Description: | Returns 315, demonstrating normalization of a negative direction value to its equivalent positive form. | |
| Related Functions: | ||
| Notes: | ||