Round numbers to the nearest multiple with an optional direction