IsVec2
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | IsVec2 | |
| Function Description: | Checks if a given table represents a valid vec2 table by verifying it has x and y fields and no z field, returning true if conditions are met and logging warnings otherwise. | |
| File Location: | cmm.positionFunctions.lua | |
| Syntax: | CMM.IsVec2( table vec2 ) | |
| Return Value: | boolean | |
| Parameters: | Name | Description |
| vec2 | A table that may contain x, y, and optionally z fields; returns true if it is a valid vec2 table with x and y present and z absent. | |
| Example: | CMM.IsVec2({x=10, y=20}) | |
| Example Description: | Returns true, confirming the input is a valid vec2 table with x and y fields and no z field. | |
| Related Functions: | ||
| Notes: | ||