Round numbers to the nearest increment with an optional direction