Rather than use a switch here, this can be collapsed into a simple range check, which is a little easier on the eyes.