diff options
author | archshift <admin@archshift.com> | 2014-05-20 02:57:35 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-05-20 02:57:35 +0200 |
commit | 5a8ed196e6e9416134a85fbc7da14fed3af307e4 (patch) | |
tree | 7a0fbc988b249f7a36fed111a411fd39f775fc36 /src/common/common_types.h | |
parent | CMakeLists: Fixed GLEW include var name, compile flag vars (diff) | |
download | yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar.gz yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar.bz2 yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar.lz yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar.xz yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.tar.zst yuzu-5a8ed196e6e9416134a85fbc7da14fed3af307e4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/common_types.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index 25dc912a9..402410507 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -100,16 +100,17 @@ union t128 { __m128 a; ///< 128-bit floating point (__m128 maps to the XMM[0-7] registers) }; +namespace common { /// Rectangle data structure -class BasicRect { +class Rect { public: - BasicRect(int x0=0, int y0=0, int x1=0, int y1=0) { + Rect(int x0=0, int y0=0, int x1=0, int y1=0) { x0_ = x0; y0_ = y0; x1_ = x1; y1_ = y1; } - ~BasicRect() { } + ~Rect() { } int x0_; ///< Rect top left X-coordinate int y0_; ///< Rect top left Y-coordinate @@ -119,7 +120,8 @@ public: inline u32 width() const { return abs(x1_ - x0_); } inline u32 height() const { return abs(y1_ - y0_); } - inline bool operator == (const BasicRect& val) const { + inline bool operator == (const Rect& val) const { return (x0_ == val.x0_ && y0_ == val.y0_ && x1_ == val.x1_ && y1_ == val.y1_); } }; +} |