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.
Diff: Ball/Ball.cpp
- Revision:
- 9:f720f5d87420
- Parent:
- 8:9b77eea95088
- Child:
- 10:da5743dfb137
--- a/Ball/Ball.cpp Wed May 08 13:49:01 2019 +0000 +++ b/Ball/Ball.cpp Wed May 08 23:09:43 2019 +0000 @@ -74,7 +74,7 @@ void Ball::hitPad(Paddle &paddle) { const Vector2D& posPad = paddle.getPos(); - if (pos.y >= posPad.y - 1 && (pos.x >= posPad.x && pos.x <= posPad.x + 12)) { + if (pos.y >= posPad.y - 1 && (pos.x >= posPad.x && pos.x <= posPad.x + paddle.getW())) { /** We hit the pad */ /** First: rotate about paddle's surface normal (flip upward) */