Quantization is the process of rounding off, but in the bit level. So I guess what the threadstarted wants is to convert floating point to fixed point. It is often used to execution time since floating point operations are expensive.
Here's something to start you thinking.
1. Rounding down is truncation after LSB.
2. Rounding off is the addition of 1/2 LSB, followed by truncation after LSB.
3. Rounding up is the addition of LSB, followed by truncation after LSB.
So the main issue is the truncation of LSB, which like I said, should be done in hexadecimal format using AND operators for maximum efficiency. Of course, if efficiency is not an issue, you could simply do multiplication, then do an integer truncation and track the rightful number of decimal places. Note that shift operators don't work with floats due to the IEEE float representation.
**broken link removed** some fixed-point arithmetic macros which could help.