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
Diff: Physics.cpp
- Revision:
- 7:4fa3edaa1201
- Parent:
- 0:3d0db4e183ee
--- a/Physics.cpp Sat Feb 28 19:40:48 2015 +0000
+++ b/Physics.cpp Mon Mar 02 09:04:13 2015 +0000
@@ -26,14 +26,10 @@
void Position::set(float x, float y)
{
- //nPrevX=nCurX;
- //nPrevY=nCurY;
pPrev=pCur;
vPos.x=x;
vPos.y=y;
pCur.set(rint(vPos.x), rint(vPos.y));
- //nCurX=rint(vPos.x);
- //nCurY=rint(vPos.y);
}
void Position::set(int x, int y)
@@ -58,14 +54,10 @@
void Position::move(float fDiffX, float fDiffY)
{
- //nPrevX=nCurX;
- //nPrevY=nCurY;
pPrev=pCur;
vPos.x+=fDiffX;
vPos.y+=fDiffY;
pCur.set(rint(vPos.x), rint(vPos.y));
- //nCurX=rint(vPos.x);
- //nCurY=rint(vPos.y);
}
void Position::move(int nDiffX, int nDiffY)