floatoperator[](size_ti)const{IM_ASSERT(i<=1);return(&x)[i];}// We very rarely use this [] operator, the assert overhead is fine.
floatoperator[](size_tidx)const{IM_ASSERT(idx<=1);return(&x)[idx];}// We very rarely use this [] operator, the assert overhead is fine.
float&operator[](size_tidx){IM_ASSERT(idx<=1);return(&x)[idx];}// We very rarely use this [] operator, the assert overhead is fine.
#ifdef IM_VEC2_CLASS_EXTRA
IM_VEC2_CLASS_EXTRA// Define additional constructors and implicit cast operators in imconfig.h to convert back and forth between your math types and ImVec2.