summaryrefslogtreecommitdiff
path: root/imgui_ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'imgui_ops.h')
-rw-r--r--imgui_ops.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/imgui_ops.h b/imgui_ops.h
index e2627ab..2bf6335 100644
--- a/imgui_ops.h
+++ b/imgui_ops.h
@@ -70,6 +70,16 @@ ImVec2 operator/(ImVec2 A, real32 B)
return Result;
}
+ImVec2 operator/(real32 A, ImVec2 B)
+{
+ ImVec2 Result;
+
+ Result.x = A / B.x;
+ Result.y = A / B.y;
+
+ return Result;
+}
+
inline bool32
IsRectTouching(ImVec2 Min1, ImVec2 Max1, ImVec2 Min2, ImVec2 Max2)
{