Bruno Allaire-Lemay
/
APP1test
df
Fork of APP1 by
Utility.hpp@6:3facf0329142, 2017-01-15 (annotated)
- Committer:
- dupm2216
- Date:
- Sun Jan 15 02:04:23 2017 +0000
- Revision:
- 6:3facf0329142
- Child:
- 9:12519f9dd3cd
Move utility functions out of Accelerometer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dupm2216 | 6:3facf0329142 | 1 | #ifndef UTILITY_HPP |
dupm2216 | 6:3facf0329142 | 2 | #define UTILITY_HPP |
dupm2216 | 6:3facf0329142 | 3 | |
dupm2216 | 6:3facf0329142 | 4 | namespace utility |
dupm2216 | 6:3facf0329142 | 5 | { |
dupm2216 | 6:3facf0329142 | 6 | const double PI = 3.14159265; |
dupm2216 | 6:3facf0329142 | 7 | |
dupm2216 | 6:3facf0329142 | 8 | bool is_almost_equal(double a, double b, double tolerance); |
dupm2216 | 6:3facf0329142 | 9 | |
dupm2216 | 6:3facf0329142 | 10 | //Return angle between 0 and 360 degree |
dupm2216 | 6:3facf0329142 | 11 | double wrap_angle(double angle); |
dupm2216 | 6:3facf0329142 | 12 | double degree_from_radian(const double angle_radian); |
dupm2216 | 6:3facf0329142 | 13 | }; |
dupm2216 | 6:3facf0329142 | 14 | |
dupm2216 | 6:3facf0329142 | 15 | #endif |