func roundIndex(start, max int) []int {
	if start < 0 {
		start = 0
	}
	result := make([]int, max)
	for i := 0; i < max; i++ {
		if start+i < max {
			result[i] = start + i
		} else {
			result[i] = int(math.Abs(float64(max - (start + i))))
		}
	}
	return result
}
func roundIndex(start, max int) []int {
	if start < 0 {
		start = 0
	}
	result := make([]int, max)
	for i := 0; i < max; i++ {
		if start+i < max {
			result[i] = start + i
		} else {
			result[i] = int(math.Abs(float64(max - (start + i))))
		}
	}
	return result
}
func roundIndex ( start , max int ) [ ] int { if start < 0 { start = 0 } result := make ( [ ] int , max ) for i := 0 ; i < max ; i ++ { if start + i < max { result [ i ] = start + i } else { result [ i ] = int ( math . Abs ( float64 ( max - ( start + i ) ) ) ) } } return result }
// generates round robin indexes for a slice of length max
// starting from index start
generates round robin indexes for a slice of length max starting from index start