by RossBencina · 3mo ago · 0 comments
> d = trunc(x/y); // floor works for unsigned
>
> // NOTE: if only want 'd' and it's being converted to an
> // integer then the truncate or floor operation is
> // free in the float to integer conversion.
Please show me how to portably truncate or floor a floating point value to an int in C for "free".{within float-to-integer conversion} trunc or floor is free
that is, if you are converting, you already get it by default