Changeset 10805 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-08-15T14:45:38+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10761 r10805 1552 1552 } 1553 1553 } 1554 1555 /** 1556 * Clamp a value to the given range 1557 * @param val The value 1558 * @param min minimum value 1559 * @param max maximum value 1560 * @return the value 1561 * @since 10805 1562 */ 1563 public static double clamp(double val, double min, double max) { 1564 if (val < min) { 1565 return min; 1566 } else if (val > max) { 1567 return max; 1568 } else { 1569 return val; 1570 } 1571 } 1554 1572 }
Note:
See TracChangeset
for help on using the changeset viewer.