Add/move code into kutil library
This commit is contained in:
14
src/modules/kutil/coord.h
Normal file
14
src/modules/kutil/coord.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace kutil {
|
||||
|
||||
template <typename T>
|
||||
struct coord
|
||||
{
|
||||
T x, y;
|
||||
coord() : x(T{}), y(T{}) {}
|
||||
coord(T x, T y) : x(x), y(y) {}
|
||||
T size() const { return x * y; }
|
||||
};
|
||||
|
||||
} // namespace kutil
|
||||
Reference in New Issue
Block a user