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.
Dependencies: mbed
Diff: People/People.cpp
- Revision:
- 4:b12a49f0b730
- Parent:
- 3:b8fbaefc496c
- Child:
- 8:8287d2ef965d
--- a/People/People.cpp Sun Apr 12 12:56:49 2020 +0000 +++ b/People/People.cpp Tue Apr 14 05:47:23 2020 +0000 @@ -91,5 +91,10 @@ if(0.25f < _mag < 0.5f) { _x -= 2; _y += 2;} else if(0.5f < _mag < 0.75f) { _x -= 3; _y += 3;} else { _x -= 4; _y += 4;}} + //without going off screen + if (_x < 0) { _x = 0;} else + if (_x > 80) { _x = 80;} else + if (_y < 0) {_y = 0;} else + if (_y > 44) {_y = 44;} } \ No newline at end of file