Skip to content

Commit

Permalink
AP_Math: Add float cast to float version of fabsF to get rid of compi…
Browse files Browse the repository at this point in the history
…ler warnings about demoting doubles to floats
  • Loading branch information
katzfey committed Dec 17, 2024
1 parent aec7cc2 commit 0b2421b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libraries/AP_Math/ftype.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ typedef double ftype;
#define ceilF(x) ceil(x)
#define fminF(x,y) fmin(x,y)
#define fmodF(x,y) fmod(x,y)
#define fabsF(x) fabs(x)
#define toftype todouble
#else
typedef float ftype;
Expand All @@ -43,11 +42,10 @@ typedef float ftype;
#define fmaxF(x,y) fmaxf(x,y)
#define powF(x,y) powf(x,y)
#define logF(x) logf(x)
#define fabsF(x) fabsf(x)
#define fabsF(x) fabsf((float)(x))
#define ceilF(x) ceilf(x)
#define fminF(x,y) fminf(x,y)
#define fmodF(x,y) fmodf(x,y)
#define fabsF(x) fabsf(x)
#define toftype tofloat
#endif

Expand Down

0 comments on commit 0b2421b

Please sign in to comment.