- Timestamp:
- 2021-04-12T21:20:34+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r17758 r17759 190 190 FACTORY_MAP.put("lower", Factory.of(String.class, Functions::lower)); 191 191 FACTORY_MAP.put("minus", Factory.ofNumberVarArgs(Functions::minus)); 192 FACTORY_MAP.put("mod", Factory.of(float.class, float.class, Functions::mod)); 192 193 FACTORY_MAP.put("not", Factory.of(boolean.class, Functions::not)); 193 194 FACTORY_MAP.put("not_equal", Factory.of(Object.class, Object.class, Functions::not_equal)); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
r17758 r17759 112 112 113 113 /** 114 * Function associated to the math modulo "%" operator. 115 * @param a first value 116 * @param b second value 117 * @return {@code a mod b}, e.g., {@code mod(7, 5) = 2} 118 */ 119 public static float mod(float a, float b) { // NO_UCD (unused code) 120 return a % b; 121 } 122 123 /** 114 124 * Creates a list of values, e.g., for the {@code dashes} property. 115 125 * @param ignored The environment (ignored)
Note:
See TracChangeset
for help on using the changeset viewer.