Almost correct. It actually rounds towards zero. Otherwise known as the 'chop' rounding method, where you chop off everything after the decimal point.Originally Posted by Cat
I.e. -9/10 is zero, not minus one.
This is a discussion on module division the % sign within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Cat Integer division NEVER rounds up. Only down. In fact, you should not consider it rounding -- ...
Almost correct. It actually rounds towards zero. Otherwise known as the 'chop' rounding method, where you chop off everything after the decimal point.Originally Posted by Cat
I.e. -9/10 is zero, not minus one.