- if (upper_slack > lower_slack && upper_slack > half_bin_width)
- {
- /* Adjust the range to the left */
- lower_limit --;
- upper_limit --;
- upper_slack -= half_bin_width;
- lower_slack += half_bin_width;
- }
- else if (lower_slack > upper_slack && lower_slack >= half_bin_width)
- {
- /* Adjust the range to the right */
- lower_limit ++;
- upper_limit ++;
- lower_slack -= half_bin_width;
- upper_slack += half_bin_width;
- }
- else
- {
- /* In this case, we cannot adjust in either direction.
- To get the most pleasing alignment, we would have to change
- the bin width (which would have other visual disadvantages).
- */
- }