Round number before converting to hex

Prevents having non-integer values