Re: [dev] [st] [PATCH] Explicit cast in CEIL macro
>
> True.
> Hence, and following other sources about this topic [0], I suggest
>
> #define CEIL(x) ((int)(x) + ((int)(x) > 0) * ((x - (int)(x)) > FLT_EPSILON))
>
On another note, I'd even use && instead of * there, but that would
require another pair of parentheses.
Received on Tue Jun 24 2014 - 17:22:06 CEST
This archive was generated by hypermail 2.3.0
: Tue Jun 24 2014 - 17:24:19 CEST