Ignore:
Timestamp:
2016-08-15T14:45:38+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #13287 - Projection updates to support multiple projections (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10761 r10805  
    15521552        }
    15531553    }
     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    }
    15541572}
Note: See TracChangeset for help on using the changeset viewer.