Rally X
ELEN3009 Project by Justin Wernick and David Schneider
source/logic/MazeMath.cpp
Go to the documentation of this file.
00001 #include "MazeMath.h"
00002 
00003 double MazeMath::round(double value)
00004 {
00005     if (static_cast<int>(value*10)%10 < 5)
00006     {
00007         return floor(value);
00008     }
00009     else
00010     {
00011         return ceil(value);
00012     }
00013 }
00014 
00015 double MazeMath::distance(double x1, double y1, double x2, double y2)
00016 {
00017     return sqrt(pow(x1-x2, 2) + pow(y1-y2, 2));
00018 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator