Ignore:
Timestamp:
2010-12-11T12:48:20+01:00 (13 years ago)
Author:
bastiK
Message:

minor change needed for terracer plugin

File:
1 edited

Legend:

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

    r3674 r3711  
    2727        }
    2828    }
     29
     30    /**
     31     * return the modulus in the range [0, n)
     32     */
     33    public static int mod(int a, int n) {
     34        if (n <= 0)
     35            throw new IllegalArgumentException();
     36        int res = a % n;
     37        if (res < 0) {
     38            res += n;
     39        }
     40        return res;
     41    }
     42
    2943}
Note: See TracChangeset for help on using the changeset viewer.