From af12180611e2c0520ee4974d5246e474fd8e704e Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 24 May 2009 16:53:02 +0200 Subject: Fixed a few code style issues Also renamed Guild::totalMembers to Guild::memberCount --- src/game-server/collisiondetection.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/game-server/collisiondetection.cpp') diff --git a/src/game-server/collisiondetection.cpp b/src/game-server/collisiondetection.cpp index be77024c..0a7a97ea 100644 --- a/src/game-server/collisiondetection.cpp +++ b/src/game-server/collisiondetection.cpp @@ -97,11 +97,11 @@ bool Collision::diskWithCircleSector(const Point &diskCenter, int diskRadius, float d = ((dx * dx) + (dy * dy)); // d^2 < r2^2 - if(d < r2 * r2) + if (d < r2 * r2) return true; // We are right on top of each other // d^2 > r1^2 + r2^2 - if(d > ((r1+r2) * (r1+r2))) + if (d > ((r1+r2) * (r1+r2))) return false; // The two circles do not touch float s1 = placeAngle - halfTopAngle, @@ -117,7 +117,7 @@ bool Collision::diskWithCircleSector(const Point &diskCenter, int diskRadius, s2 += 360; // Is the center point of circle 2 within circle 1? - if(d < r1 * r1) + if (d < r1 * r1) { // Circle 2 degrees in respect to circle 1 float c2dc1 = atan2(dy,dx) * R_TO_D; @@ -146,15 +146,15 @@ bool Collision::diskWithCircleSector(const Point &diskCenter, int diskRadius, iy2 = ayd + ((h * dy) / d); float idc1 = atan2(iy1,ix1) * R_TO_D; - if(idc1 < 0) + if (idc1 < 0) idc1 += 360; - if(test_degrees(idc1, s1, s2)) + if (test_degrees(idc1, s1, s2)) return true; idc1 = atan2(iy2,ix2) * R_TO_D; - if(idc1 < 0) + if (idc1 < 0) idc1 += 360; - if(test_degrees(idc1, s1, s2)) + if (test_degrees(idc1, s1, s2)) return true; // If we got to this point, it must be false -- cgit v1.2.3-60-g2f50