> For the complete documentation index, see [llms.txt](https://docs.cherax.vip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherax.vip/lua-documentation/api-reference/classes/vec2.md).

# vec2

@property float x @property float y

@constructor vec2() @constructor vec2(float, float)

@method vec2 \_\_add(vec2|vec3|float)&#x20;

@method vec2 \_\_sub(vec2|vec3|float)&#x20;

@method vec2 \_\_mul(vec2|vec3|float)&#x20;

@method vec2 \_\_div(vec2|vec3|float)&#x20;

@method bool \_\_eq(vec2)&#x20;

@method bool \_\_lt(vec2)&#x20;

@method bool \_\_le(vec2)&#x20;

@method string \_\_tostring()&#x20;

@method float length() @method float distanceTo(vec2)
