Ignore:
Timestamp:
2017-03-08T21:18:57+01:00 (7 years ago)
Author:
Don-vip
Message:

more usages of Utils.clamp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r11613 r11702  
    294294
    295295        // shrink to range
    296         heatMapDrawGain = Math.min(Math.max(-10, heatMapDrawGain), 10);
     296        heatMapDrawGain = Utils.clamp(heatMapDrawGain, -10, 10);
    297297
    298298        neutralColor = getColor(layerName, true);
     
    732732
    733733        // adjust global settings
    734         final int globalLineWidth = Math.min(Math.max(lineWidth, 1), 20);
     734        final int globalLineWidth = Utils.clamp(lineWidth, 1, 20);
    735735
    736736        // cache scale of view
     
    11571157
    11581158        // adjust global settings ( zero = default line width )
    1159         final int globalLineWidth = (0 == lineWidth) ? 1 : Math.min(Math.max(lineWidth, 1), 20);
     1159        final int globalLineWidth = (0 == lineWidth) ? 1 : Utils.clamp(lineWidth, 1, 20);
    11601160
    11611161        // 1st setup virtual paint area ----------------------------------------
Note: See TracChangeset for help on using the changeset viewer.