Using this
int i; float f = 1.53; i = Convert::ToInt32(f);
Will cause i = 2, because Convert::ToInt rounds to the nearest value. To force rounding down use: (more…)