Skip to content

Commit da5bd51

Browse files
committed
Fixes to build examples on older imgui
1 parent 0f69978 commit da5bd51

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

imgui_extra_math.inl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ inline ImVec2 operator*(const float lhs, const ImVec2& rhs)
3434
return ImVec2(lhs * rhs.x, lhs * rhs.y);
3535
}
3636

37+
# if IMGUI_VERSION_NUM < 18955
38+
inline ImVec2 operator-(const ImVec2& lhs)
39+
{
40+
return ImVec2(-lhs.x, -lhs.y);
41+
}
42+
# endif
43+
3744
//------------------------------------------------------------------------------
3845
inline float ImLength(float v)
3946
{

0 commit comments

Comments
 (0)