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: source/bola.h
- Revision:
- 2:292e47672dbe
- Parent:
- 1:2c86b5fb793a
- Child:
- 3:39316d8caa86
diff -r 2c86b5fb793a -r 292e47672dbe source/bola.h --- a/source/bola.h Sun May 17 02:06:13 2020 +0000 +++ b/source/bola.h Sun May 17 02:41:51 2020 +0000 @@ -104,7 +104,7 @@ float diff = y - (p->y - p->h); //float angle = map(diff, 0, p->h, 255 * M_PI / 180, 135 * M_PI / 180); //float angle = (225 * xpi) + ((135 * xpi) - (225 * xpi)) * (diff / p->h); - float angle = (diff / p->h) * ((225 * xpi) - (135 * xpi)) + (135 * xpi); + float angle = (diff / p->h) * (225*xpi - 135*xpi) + 135*xpi; dirx = speed * cos(angle); diry = speed * sin(angle);