Of course you can use the math libraries and actually round, but this is a quick one-liner that truncates to two digits.
fValue = static_cast<int>(fValue * 100) / 100.0;
Of course you can use the math libraries and actually round, but this is a quick one-liner that truncates to two digits.
fValue = static_cast<int>(fValue * 100) / 100.0;