summaryrefslogtreecommitdiffstats
path: root/src/math/Rect.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 21:24:47 +0200
committeraap <aap@papnet.eu>2019-05-30 21:24:47 +0200
commit188aab4196c1d9de0c1bf33be1114e7a0e11fd19 (patch)
treeff0c0a98ced0ba0bbabf34f5f6b1c0e152dcb194 /src/math/Rect.h
parentfixed ped states (diff)
downloadre3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.gz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.bz2
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.lz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.xz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.zst
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.zip
Diffstat (limited to 'src/math/Rect.h')
-rw-r--r--src/math/Rect.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/math/Rect.h b/src/math/Rect.h
index 212645fa..d0824987 100644
--- a/src/math/Rect.h
+++ b/src/math/Rect.h
@@ -1,31 +1,29 @@
#pragma once
-#pragma once
-
class CRect
{
public:
float left; // x min
- float top; // y max
+ float bottom; // y max
float right; // x max
- float bottom; // y min
+ float top; // y min
CRect(void){
left = 1000000.0f;
- bottom = 1000000.0f;
+ top = 1000000.0f;
right = -1000000.0f;
- top = -1000000.0f;
+ bottom = -1000000.0f;
}
- CRect(float l, float b, float r, float t){
+ CRect(float l, float t, float r, float b){
left = l;
- bottom = b;
- right = r;
top = t;
+ right = r;
+ bottom = b;
}
void ContainPoint(CVector const &v){
if(v.x < left) left = v.x;
if(v.x > right) right = v.x;
- if(v.y < bottom) bottom = v.y;
- if(v.y > top) top = v.y;
+ if(v.y < top) top = v.y;
+ if(v.y > bottom) bottom = v.y;
}
};