diff options
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}; +} |
