summaryrefslogtreecommitdiff
path: root/core/src/cpp/size2d.h
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-12-23 15:28:05 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-12-23 15:28:05 +0100
commitc055eeef6d41269d11b2ddf7f9aba6f8867da65d (patch)
treedcd9baaec93c50a8ab49656be86ea248c17421fd /core/src/cpp/size2d.h
initial commitHEADmaster
Diffstat (limited to 'core/src/cpp/size2d.h')
-rw-r--r--core/src/cpp/size2d.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/cpp/size2d.h b/core/src/cpp/size2d.h
new file mode 100644
index 0000000..1d12307
--- /dev/null
+++ b/core/src/cpp/size2d.h
@@ -0,0 +1,15 @@
+#pragma once
+
+template <typename T = int> struct size2d
+{
+ T w{0};
+ T h{0};
+
+ inline size2d<T> operator/(const size2d<T>& other);
+};
+
+template <typename T>
+inline size2d<T> size2d<T>::operator/(const size2d<T>& other)
+{
+ return {w / other.w, h / other.h};
+}