1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Fix double constatns

some constants were double, M_PI was sometimes inherided as double

added -Wdouble-promotion to makefile warnings
This commit is contained in:
Petr Ledvina 2014-11-19 17:00:21 +01:00
parent ec3b83682b
commit 4157cf5315
4 changed files with 7 additions and 5 deletions

View file

@ -21,9 +21,11 @@
#define sq(x) ((x)*(x))
#endif
#ifndef M_PI
#ifdef M_PI
// M_PI should be float, but previous definition may be double
# undef M_PI
#endif
#define M_PI 3.14159265358979323846f
#endif /* M_PI */
#define RADX10 (M_PI / 1800.0f) // 0.001745329252f
#define RAD (M_PI / 180.0f)