Tick generator using interval.

Close #1166.
the `Math.max` is unnecessary, def `num = Math.floor((high - first) / interval) + 1`, then `num >=0` for all values.
proof:
`first = f * interval`, f is integer
`low = f * interval - lowRemainder` where `0 <= lowRemainder < interval`
note this is consistent with the declaration `first = ceil(low/interval) * interval`:
> `first = ceil (low/interval) * interval`
> `first = ceil((f*interval - lowRemainder) / interval) * interval` substituting in low
> `first = ceil(f - lowRemainder / interval) * interval` distribute division
> `first = f - ceil(-lowRemainder / interval) * interval` move f out since it is integer
> `first = f * interval` since `lowRemainder < interval`

let 
`high = (f + n) * interval + highRemainder` where `-interval < highRemainder < interval`, `n >= 0` since `high > low`

then declare `num = floor((high - first) / interval) + 1`
> `num = floor( ((f + n) * interval + highRemainder - f * interval) / interval) + 1` substitute in
> `num = floor( (n * interval + highRemainder) / interval) + 1` cancel out the `f*interval` terms
> `num = floor( n + highRemainder / interval) + 1` distribute the division
> `num = n + 1 + floor(highRemainder / interval)` since `n` is integer
> `num >= n + 1 - 1` since `(highRemainder > -interval)`
> `num >= n`
> `num >= 0`