Lib_Misc
Diff: Unwrapper_2pi.cpp
- Revision:
- 14:d5f47a30ef19
- Parent:
- 13:c2124af33e67
diff -r c2124af33e67 -r d5f47a30ef19 Unwrapper_2pi.cpp --- a/Unwrapper_2pi.cpp Mon Oct 21 17:15:24 2019 +0000 +++ b/Unwrapper_2pi.cpp Fri Jan 10 16:01:33 2020 +0000 @@ -2,7 +2,7 @@ */ #include "Unwrapper_2pi.h" -#define pi 3.141592653589793 +#define pi 3.1415927f using namespace std; Unwrapper_2pi::Unwrapper_2pi(void) @@ -27,7 +27,7 @@ turns--; } else if((temp - last_value) < -(float)pi){ - temp += 2*pi; + temp += 2.0f*pi; turns++; } last_value = temp;