You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* F16() and F16C() are both rounding allways, so this should as well */
//#ifndef FIXMATH_NO_ROUNDING
temp+= (double)((temp >= 0) ? 0.5f : -0.5f);
//#endif
return (fix16_t)temp;
}
First, I think it's problematic that "from double" is disregarding the rounding compile def while "from float" respects it.
Second, I'm curious about the statement:
temp+= (temp >= 0) ? 0.5f : -0.5f;
In my use case, won't this bring in the soft fadd that I don't want? Then again, I suppose that the user is just doing it wrong if they don't want any floats yet the end up using fix16_from_float at runtime!
The text was updated successfully, but these errors were encountered:
Often, my use case may be to avoid soft floats on hardware that has no FPU. See this section of code:
libfixmath/libfixmath/fix16.h
Lines 72 to 89 in d308e46
First, I think it's problematic that "from double" is disregarding the rounding compile def while "from float" respects it.
Second, I'm curious about the statement:
In my use case, won't this bring in the soft fadd that I don't want? Then again, I suppose that the user is just doing it wrong if they don't want any floats yet the end up using fix16_from_float at runtime!
The text was updated successfully, but these errors were encountered: