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: PeopleEngine/People.cpp
- Revision:
- 12:009895f6b6e4
- Parent:
- 9:62d6559f0d50
- Child:
- 13:eb60628db8bf
diff -r 494cc44777fe -r 009895f6b6e4 PeopleEngine/People.cpp --- a/PeopleEngine/People.cpp Mon May 11 09:09:31 2020 +0000 +++ b/PeopleEngine/People.cpp Mon May 11 14:43:16 2020 +0000 @@ -55,38 +55,38 @@ if(_mag < 0.25f) { _x += 0; _y += 1;} else if(0.25f < _mag < 0.5f) { _x += 0; _y += 2;} else if(0.5f < _mag < 0.75f) { _x += 0; _y += 3;} else - { _x += 0; _y += 4;}} - if (_d == SE) { + { _x += 0; _y += 4;}}else + if (_d == SE){ if(_mag < 0.25f) { _x += 1; _y += 1;} else 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;}} + { _x += 4; _y += 4;}}else if (_d == E) { if(_mag < 0.25f) { _x += 1; _y += 0;} else if(0.25f < _mag < 0.5f) { _x += 2; _y += 0;} else if(0.5f < _mag < 0.75f) { _x += 3; _y += 0;} else - { _x += 4; _y += 0;}} - if (_d == NE) { + { _x += 4; _y += 0;}}else + if (_d == NE){ if(_mag < 0.25f) { _x += 1; _y -= 1;} else 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;}} + { _x += 4; _y -= 4;}}else if (_d == N) { if(_mag < 0.25f) { _x += 0; _y -= 1;} else if(0.25f < _mag < 0.5f) { _x += 0; _y -= 2;} else if(0.5f < _mag < 0.75f) { _x += 0; _y -= 3;} else - { _x += 0; _y -= 4;}} - if (_d == NW) { + { _x += 0; _y -= 4;}}else + if (_d == NW){ if(_mag < 0.25f) { _x -= 1; _y -= 1;} else 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;}} + { _x -= 4; _y -= 4;}}else if (_d == W) { if(_mag < 0.25f) { _x -= 1; _y -= 0;} else if(0.25f < _mag < 0.5f) { _x -= 2; _y -= 0;} else if(0.5f < _mag < 0.75f) { _x -= 3; _y -= 0;} else - { _x -= 4; _y -= 0;}} - if (_d == NW) { + { _x -= 4; _y -= 0;}}else + if (_d == NW){ if(_mag < 0.25f) { _x -= 1; _y += 1;} else if(0.25f < _mag < 0.5f) { _x -= 2; _y += 2;} else if(0.5f < _mag < 0.75f) { _x -= 3; _y += 3;} else