@@ -2731,6 +2731,7 @@ struct ImGuiListClipper
2731
2731
#ifdef IMGUI_DEFINE_MATH_OPERATORS
2732
2732
#define IMGUI_DEFINE_MATH_OPERATORS_IMPLEMENTED
2733
2733
IM_MSVC_RUNTIME_CHECKS_OFF
2734
+ // ImVec2 operators
2734
2735
static inline ImVec2 operator *(const ImVec2& lhs, const float rhs) { return ImVec2 (lhs.x * rhs, lhs.y * rhs); }
2735
2736
static inline ImVec2 operator /(const ImVec2& lhs, const float rhs) { return ImVec2 (lhs.x / rhs, lhs.y / rhs); }
2736
2737
static inline ImVec2 operator +(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2 (lhs.x + rhs.x , lhs.y + rhs.y ); }
@@ -2746,9 +2747,14 @@ static inline ImVec2& operator*=(ImVec2& lhs, const ImVec2& rhs) { lhs.x
2746
2747
static inline ImVec2& operator /=(ImVec2& lhs, const ImVec2& rhs) { lhs.x /= rhs.x ; lhs.y /= rhs.y ; return lhs; }
2747
2748
static inline bool operator ==(const ImVec2& lhs, const ImVec2& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y ; }
2748
2749
static inline bool operator !=(const ImVec2& lhs, const ImVec2& rhs) { return lhs.x != rhs.x || lhs.y != rhs.y ; }
2750
+ // ImVec4 operators
2751
+ static inline ImVec4 operator *(const ImVec4& lhs, const float rhs) { return ImVec4 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); }
2752
+ static inline ImVec4 operator /(const ImVec4& lhs, const float rhs) { return ImVec4 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); }
2749
2753
static inline ImVec4 operator +(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4 (lhs.x + rhs.x , lhs.y + rhs.y , lhs.z + rhs.z , lhs.w + rhs.w ); }
2750
2754
static inline ImVec4 operator -(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4 (lhs.x - rhs.x , lhs.y - rhs.y , lhs.z - rhs.z , lhs.w - rhs.w ); }
2751
2755
static inline ImVec4 operator *(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4 (lhs.x * rhs.x , lhs.y * rhs.y , lhs.z * rhs.z , lhs.w * rhs.w ); }
2756
+ static inline ImVec4 operator /(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4 (lhs.x / rhs.x , lhs.y / rhs.y , lhs.z / rhs.z , lhs.w / rhs.w ); }
2757
+ static inline ImVec4 operator -(const ImVec4& lhs) { return ImVec4 (-lhs.x , -lhs.y , -lhs.z , -lhs.w ); }
2752
2758
static inline bool operator ==(const ImVec4& lhs, const ImVec4& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.w == rhs.w ; }
2753
2759
static inline bool operator !=(const ImVec4& lhs, const ImVec4& rhs) { return lhs.x != rhs.x || lhs.y != rhs.y || lhs.z != rhs.z || lhs.w != rhs.w ; }
2754
2760
IM_MSVC_RUNTIME_CHECKS_RESTORE
0 commit comments