summaryrefslogtreecommitdiff
path: root/core/src/cpp/size2d.h
blob: 1d123073cce25acb863c16840036b86393368fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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};
}