/**
* Calculates distance in RGB color space with Euklidian distance between each component
*
* @param c1 {@link Color} one
* @param c2 {@link Color} two
* @return double result of comparison. Max possible distance is 225.0. Minimum 0.0
*/
public static double colorDistance( Color c1, Color c2 )
{
double rDist = c1.getRed() - c2.getRed();
double gDist = c1.getGreen() - c2.getGreen();
double bDist = c1.getBlue() - c2.getBlue();
return Math.sqrt( rDist * rDist + gDist * gDist + bDist * bDist )/* / SQRT_3*/;
}//end color distance method
...
Random rnd = new Random();
for ( int i = 0; i < 50; i++ )
System.out.println( String.format( Locale.US, "+++ #%2d: %5.2f", i+1, rnd.nextDouble() * 100.0d ) );
...
public boolean contains(double x, double y) {
double x0 = getX();
double y0 = getY();
return (x >= x0 &&
y >= y0 &&
x < x0 + getWidth() &&
y < y0 + getHeight());
}
...
String path = args[0]; // и другие имена как args[1]... args[N]
...
Понять можно всех. Принять - нет. Это не об авторе Leaflet, а в целом.