this is the mapping between the half of each percentage intervals and the associated usWidthClass: {56.25: 1, 68.75: 2, 81.25: 3, 93.75: 4, 106.25: 5, 118.75: 6, 137.5: 7, 175.0: 8} Notice how wdth=80 (in the adjusted test case) will fall in width class 3, instead of 4, because it is < 81.25, thus closer to the nominal 75 than to 87.5.