@ -249,8 +249,8 @@ IM_MSVC_RUNTIME_CHECKS_OFF
struct ImVec2
struct ImVec2
{
{
float x , y ;
float x , y ;
ImVec2 ( ) { x = y = 0.0f ; }
constexpr ImVec2 ( ) : x ( 0.0f ) , y ( 0.0f ) { }
ImVec2 ( float _x , float _y ) { x = _x ; y = _y ; }
constexpr ImVec2 ( float _x , float _y ) : x ( _x ) , y ( _y ) { }
float operator [ ] ( size_t idx ) const { IM_ASSERT ( idx < = 1 ) ; return ( & x ) [ idx ] ; } // We very rarely use this [] operator, the assert overhead is fine.
float operator [ ] ( size_t idx ) const { IM_ASSERT ( idx < = 1 ) ; return ( & x ) [ idx ] ; } // We very rarely use this [] operator, the assert overhead is fine.
float & operator [ ] ( size_t idx ) { IM_ASSERT ( idx < = 1 ) ; return ( & x ) [ idx ] ; } // We very rarely use this [] operator, the assert overhead is fine.
float & operator [ ] ( size_t idx ) { IM_ASSERT ( idx < = 1 ) ; return ( & x ) [ idx ] ; } // We very rarely use this [] operator, the assert overhead is fine.
# ifdef IM_VEC2_CLASS_EXTRA
# ifdef IM_VEC2_CLASS_EXTRA
@ -262,8 +262,8 @@ struct ImVec2
struct ImVec4
struct ImVec4
{
{
float x , y , z , w ;
float x , y , z , w ;
ImVec4 ( ) { x = y = z = w = 0.0f ; }
constexpr ImVec4 ( ) : x ( 0.0f ) , y ( 0.0f ) , z ( 0.0f ) , w ( 0.0f ) { }
ImVec4 ( float _x , float _y , float _z , float _w ) { x = _x ; y = _y ; z = _z ; w = _w ; }
constexpr ImVec4 ( float _x , float _y , float _z , float _w ) : x ( _x ) , y ( _y ) , z ( _z ) , w ( _w ) { }
# ifdef IM_VEC4_CLASS_EXTRA
# ifdef IM_VEC4_CLASS_EXTRA
IM_VEC4_CLASS_EXTRA // Define additional constructors and implicit cast operators in imconfig.h to convert back and forth between your math types and ImVec4.
IM_VEC4_CLASS_EXTRA // Define additional constructors and implicit cast operators in imconfig.h to convert back and forth between your math types and ImVec4.
# endif
# endif