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: FastPWM MODSERIAL QEI mbed
Diff: tools.h
- Revision:
- 2:df0c6af898ac
- Parent:
- 0:caa8ee3bd882
- Child:
- 5:088917beb5e4
--- a/tools.h Sun Nov 12 12:05:22 2017 +0000 +++ b/tools.h Sun Nov 12 14:06:23 2017 +0000 @@ -1,10 +1,18 @@ +// radians per degree const double kRadPerDeg = 3.1415926535 / 180; +/** + * Radians to degrees + */ double rad2deg(double rad) { return rad / kRadPerDeg; } + +/** + * Degrees to radians + */ double deg2rad(double deg) { return deg * kRadPerDeg; -} \ No newline at end of file +}