Board Thread:Support Requests - Getting Technical/@comment-25286508-20150128233153/@comment-4478975-20150129025545

I'm not sure how generic or specific you want to be able to make bounds but what immediately came to mind was just:

for the switch then 0,1,...,n-1,n for the number of groups you want.

You would need to scale x into the range 0-n of course, but that's just multiplication/division up front. I suspect floor would work just as well, but you're using int for the cases so might as well.