I usually add 0.5 to a floating number before converting it to an int as a work around.