Elements used in the Balls and Things games for the RETRO.
Dependents: RETRO_BallsAndPaddle RETRO_BallAndHoles
Revision 8:19dd2a538cbe, committed 2015-03-02
- Comitter:
- maxint
- Date:
- Mon Mar 02 09:58:53 2015 +0000
- Parent:
- 7:4fa3edaa1201
- Commit message:
- more clean-up
Changed in this revision
Shapes.cpp | Show annotated file Show diff for this revision Revisions of this file |
Shapes.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4fa3edaa1201 -r 19dd2a538cbe Shapes.cpp --- a/Shapes.cpp Mon Mar 02 09:04:13 2015 +0000 +++ b/Shapes.cpp Mon Mar 02 09:58:53 2015 +0000 @@ -96,7 +96,7 @@ if(nDistApprox<nDist1 && nDistApprox<nDist2) return(nDistApprox); - return(MIN(nDist1,nDist2)); + return(min(nDist1,nDist2)); }
diff -r 4fa3edaa1201 -r 19dd2a538cbe Shapes.h --- a/Shapes.h Mon Mar 02 09:04:13 2015 +0000 +++ b/Shapes.h Mon Mar 02 09:58:53 2015 +0000 @@ -1,9 +1,10 @@ #pragma once +#include <algorithm> // required for min() and max(), see http://www.cplusplus.com/reference/algorithm/ #include "mbed.h" #include "Vector.h" -#define MAX(x, y) (((x) > (y)) ? (x) : (y)) -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) +//#define MAX(x, y) (((x) > (y)) ? (x) : (y)) +//#define MIN(x, y) (((x) < (y)) ? (x) : (y)) class Point {