mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
math/test/test.cpp has invalid calls
The function calls ceil() and floor() but passes an int and there is obviously no implementation for that so clang fails. It seems like exp should be a float from this code. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
a1332e699c
commit
4cedcfc58e
@ -59,6 +59,9 @@ void __EXPORT float2SigExp(
|
||||
float &sig,
|
||||
int &exp)
|
||||
{
|
||||
// FIXME - This code makes no sense when exp is an int
|
||||
// FIXME - isnan and isinf not defined for QuRT
|
||||
#ifndef __PX4_QURT
|
||||
if (isnan(num) || isinf(num)) {
|
||||
sig = 0.0f;
|
||||
exp = -99;
|
||||
@ -79,6 +82,7 @@ void __EXPORT float2SigExp(
|
||||
} else {
|
||||
exp = floor(exp);
|
||||
}
|
||||
#endif
|
||||
|
||||
sig = num;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user