diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2025-12-23 15:28:05 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2025-12-23 15:28:05 +0100 |
| commit | c055eeef6d41269d11b2ddf7f9aba6f8867da65d (patch) | |
| tree | dcd9baaec93c50a8ab49656be86ea248c17421fd /core/src/cpp/size2d.h | |
Diffstat (limited to 'core/src/cpp/size2d.h')
| -rw-r--r-- | core/src/cpp/size2d.h | 15 |
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}; +} |
