Stepped variant of randrange.