DSC Engine
Loading...
Searching...
No Matches
size.hpp
1#pragma once
2
3namespace DSC
4{
8 template<typename T>
9 struct Size
10 {
14 template<typename T2>
15 inline operator Size<T2>() const { return {(T2)width, (T2)height}; }
16 };
17
18
19 template<typename T>
20 inline bool operator == (const Size<T>& s1, const Size<T>& s2) { return s1.x==s2.x && s1.y==s2.y; }
21
22 template<typename T>
23 inline bool operator != (const Size<T>& s1, const Size<T>& s2) { return s1.x!=s2.x || s1.y!=s2.y; }
24
25}
Generic size of two coordinates.
Definition: size.hpp:10
T height
Definition: size.hpp:12
T width
Definition: size.hpp:11