From 2cc21176467d4501adb7bfb9ee03eb9a2a7d14f2 Mon Sep 17 00:00:00 2001 From: majortom6 Date: Sun, 19 Feb 2017 08:06:37 -0600 Subject: -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 --- inc/functions.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/functions.hpp') 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 -- cgit v1.2.3