Rectangle.hpp
1// Copyright 2019 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4
5#ifndef SMK_RECTANGLE
6#define SMK_RECTANGLE
7
8#include <glm/glm.hpp>
9
10namespace smk {
11
12struct Rectangle {
13 float left;
14 float top;
15 float right;
16 float bottom;
17
18 float width() const { return right - left; }
19 float height() const { return bottom - top; }
20};
21
22} // namespace smk
23
24#endif /* end of include guard: SMK_RECTANGLE */