Changeset 12538 in josm
 Timestamp:
 20170730T00:47:03+02:00 (4 years ago)
 Location:
 trunk/src/org/openstreetmap/josm
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r12375 r12538 234 234 * @param pCoordinate The coordinate to convert 235 235 * @return The coordinate in degrees/minutes format 236 */ 237 public static String dm(double pCoordinate) { 236 * @since 12537 237 */ 238 public static String degreesMinutes(double pCoordinate) { 238 239 239 240 double tAbsCoord = Math.abs(pCoordinate); … … 250 251 251 252 return sDegrees + '\u00B0' + sMinutes + '\''; 253 } 254 255 /** 256 * Replies the coordinate in degrees/minutes format 257 * @param pCoordinate The coordinate to convert 258 * @return The coordinate in degrees/minutes format 259 * @deprecated use {@link #degreesMinutes(double)} instead 260 */ 261 @Deprecated 262 public static String dm(double pCoordinate) { 263 return degreesMinutes(pCoordinate); 252 264 } 253 265 … … 291 303 case DECIMAL_DEGREES: return cDdFormatter.format(y); 292 304 case DEGREES_MINUTES_SECONDS: return dms(y) + ((y < 0) ? SOUTH : NORTH); 293 case NAUTICAL: return d m(y) + ((y < 0) ? SOUTH : NORTH);305 case NAUTICAL: return degreesMinutes(y) + ((y < 0) ? SOUTH : NORTH); 294 306 case EAST_NORTH: return cDdFormatter.format(this.getEastNorth().north()); 295 307 default: return "ERR"; … … 311 323 case DECIMAL_DEGREES: return cDdFormatter.format(x); 312 324 case DEGREES_MINUTES_SECONDS: return dms(x) + ((x < 0) ? WEST : EAST); 313 case NAUTICAL: return d m(x) + ((x < 0) ? WEST : EAST);325 case NAUTICAL: return degreesMinutes(x) + ((x < 0) ? WEST : EAST); 314 326 case EAST_NORTH: return cDdFormatter.format(this.getEastNorth().east()); 315 327 default: return "ERR"; 
trunk/src/org/openstreetmap/josm/tools/ColorScale.java
r12367 r12538 62 62 quadrant = Utils.mod(quadrant+1, 4); 63 63 64 float vh = h[quadrant] * w (angle) + h[quadrant+1] * (1  w(angle));65 float vs = s[quadrant] * w (angle) + s[Utils.mod(quadrant+1, 4)] * (1  w(angle));66 float vb = b[quadrant] * w (angle) + b[Utils.mod(quadrant+1, 4)] * (1  w(angle));64 float vh = h[quadrant] * weighted(angle) + h[quadrant+1] * (1  weighted(angle)); 65 float vs = s[quadrant] * weighted(angle) + s[Utils.mod(quadrant+1, 4)] * (1  weighted(angle)); 66 float vb = b[quadrant] * weighted(angle) + b[Utils.mod(quadrant+1, 4)] * (1  weighted(angle)); 67 67 68 68 sc.colors[i] = Color.getHSBColor(vh/360f, vs/100f, vb/100f); … … 79 79 * @return the weighted value 80 80 */ 81 private static float w (float x) {81 private static float weighted(float x) { 82 82 if (x < 0.5) 83 83 return 1  2*x*x;
Note: See TracChangeset
for help on using the changeset viewer.