summaryrefslogtreecommitdiff
path: root/inc/functions.hpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-19 08:06:37 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:41 -0600
commit2cc21176467d4501adb7bfb9ee03eb9a2a7d14f2 (patch)
treee12ceac7024bdc697f1ed4adc1a1ece4a82489fc /inc/functions.hpp
parent74c6854fd8dcbaee736ac0421805ff1e03c4a1e2 (diff)
-removed all references to sdl_rect and location and now everything now uses our own class rectangle
-standardization of tab spaces to 8 is now in effect -refractoring of graphicsobjects.hpp
Diffstat (limited to 'inc/functions.hpp')
-rw-r--r--inc/functions.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/functions.hpp b/inc/functions.hpp
index ce072e2..15cb94a 100644
--- a/inc/functions.hpp
+++ b/inc/functions.hpp
@@ -1,14 +1,14 @@
#ifndef functions_h
#define functions_h
-#include "graphicsobjects.hpp"
+#include "rectangle.hpp"
-static double Distance(Location A, Location B){
- return sqrt( pow(A.x-B.x,2) + pow(A.y-B.y,2));
+static double Distance(Rectangle A, Rectangle B){
+ return sqrt(pow(A.x-B.x,2) + pow(A.y-B.y,2));
}
static int map(int x, int inMin, int inMax, int outMin, int outMax){
- return (x-inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
+ return (x-inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}
#endif