mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Use std abs() instead of ABS() macro
Changes uses of ABS() macro to <stdlib.h> abs() and <math.h> fabsf()
This commit is contained in:
parent
b54174c77e
commit
61ded491cd
18 changed files with 43 additions and 30 deletions
|
@ -219,7 +219,7 @@ int osdPrintFloat(char *buffer, char leadingSymbol, float value, char *formatStr
|
|||
}
|
||||
|
||||
value *= multiplier;
|
||||
const int scaledValueAbs = ABS(round ? lrintf(value) : value);
|
||||
const int scaledValueAbs = abs(round ? (int)lrintf(value) : (int)value);
|
||||
const int integerPart = scaledValueAbs / multiplier;
|
||||
const int fractionalPart = scaledValueAbs % multiplier;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue