Jump to content

IsVec2

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (IsVec2 – created via PowerShell script (2025-11-11T21:12:34Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
vec2A 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: