Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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));
}
--- 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
{