When Max converts a float to an int, it does not round. It truncates.
Repeat the above sentence as many times as it takes to understand it. It is absolutely fundamental to how Max works.
If you want to round positive float values, you need to add 0.5 before truncation. If you need to, try it with a couple of values like 0.01, 0.25, 0.499, 0.5, 0.501, and maybe 0.999 to see why it works.
BTW, you need to *subtract* 0.5 before truncation to correctly round negative floats.