No what I mean is you need this:
mod = x
mod /= y
mod -= floor mod
mod *= y
mod = round mod
Otherwise the function will return wrong (not-integer) results for non-power of two Ys.
No what I mean is you need this:
mod = x
mod /= y
mod -= floor mod
mod *= y
mod = round mod
Otherwise the function will return wrong (not-integer) results for non-power of two Ys.