customRound function

Custom rounding function to round to the nearest specified interval