Ignore:
Timestamp:
2016-09-27T00:28:57+02:00 (8 years ago)
Author:
michael2402
Message:

Fix #13703: Allow mouse wheel to change visibility slider value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r10972 r11055  
    15021502        }
    15031503    }
     1504
     1505    /**
     1506     * Clamp a integer value to the given range
     1507     * @param val The value
     1508     * @param min minimum value
     1509     * @param max maximum value
     1510     * @return the value
     1511     * @since 11053
     1512     */
     1513    public static int clamp(int val, int min, int max) {
     1514        if (val < min) {
     1515            return min;
     1516        } else if (val > max) {
     1517            return max;
     1518        } else {
     1519            return val;
     1520        }
     1521    }
    15041522}
Note: See TracChangeset for help on using the changeset viewer.