Get distance of two points.

@param a The first localizable (must not be <code>null</code>).
@param b The second localizable (must not be <code>null</code>).
@return The distance between them.
@throws LionEngineException If invalid argument.
166538
public static double getDistance(Localizable a, Localizable b)
    {
        Check.notNull(a);
        Check.notNull(b);

        final double x = b.getX() - a.getX();
        final double y = b.getY() - a.getY();

        return StrictMath.sqrt(x * x + y * y);
    }
846296
public double getDistance(final DBIDRef o1, final DBIDRef o2) {
    return FastMath.sqrt(getSquaredDistance(o1, o2));
  }
590313
@Pure
	public double distance(Point2D<?, ?> point) {
		assert point != null;
		final GeoLocationPoint p = getGeoPosition();
		if (p != null) {
			return Point2D.getDistancePointPoint(p.getX(), p.getY(), point.getX(), point.getY());
		}
		return Double.NaN;
	}
58645
public static double longitudeDiff(double a, double b) {
        a = to180(a);
        b = to180(b);
        return Math.abs(to180(a - b));
    }
342394
public double distance(int[] point1, int[] point2) throws Exception {
    return Math.sqrt(Long.valueOf(distance2(point1, point2)).doubleValue());
  }
722820
public double distance(Object pt1, Object pt2) {
		Object p = newCopy(pt1);
		subtract(p, pt2);
		return magnitude(p);
	}
54796
public long distance(String a, String b)
    {
        SynonymItem itemA = get(a);
        if (itemA == null) return Long.MAX_VALUE / 3;
        SynonymItem itemB = get(b);
        if (itemB == null) return Long.MAX_VALUE / 3;

        return itemA.distance(itemB);
    }
1349764
protected static int getDistanceEstimate (int ax, int ay, int bx, int by)
    {
        // we're doing all of our cost calculations based on geometric distance times ten
        int xsq = bx - ax;
        int ysq = by - ay;
        return (int) (ADJACENT_COST * Math.sqrt(xsq * xsq + ysq * ysq));
    }
720294
def distance2_to(self, other: "Point2"):
        """"""
        assert isinstance(other, Point2)
        return (self[0] - other[0]) ** 2 + (self[1] - other[1]) ** 2
876921
public static double distance(double lat1, double lon1,
                                double lat2, double lon2) {
    double dLat = Math.toRadians(lat2-lat1);
    double dLon = Math.toRadians(lon2-lon1);
    lat1 = Math.toRadians(lat1);
    lat2 = Math.toRadians(lat2);

    double a = Math.sin(dLat/2) * Math.sin(dLat/2) +
        Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); 
    double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); 
    return R * c;
  }
1156608
public double distance(Instance first, Instance second) {
    return distance(first, second, Double.POSITIVE_INFINITY);
  }
1112107
public static double getDistance(double x1, double y1, double x2, double y2)
    {
        final double x = x2 - x1;
        final double y = y2 - y1;

        return StrictMath.sqrt(x * x + y * y);
    }
101887
public static double distanceSquared(double[] pointA) {
		double distance = 0.0;
		for (int i = 0; i < pointA.length; i++) {
			distance += pointA[i] * pointA[i];
		}
		return distance;
	}
1250698
public int calculateNodePathDistance(String nodePath1, String nodePath2) {
    String[] nodePathFragment1 = nodePath1.split("\\.");
    String[] nodePathFragment2 = nodePath2.split("\\.");

    int overlapBlock = 0;
    while (overlapBlock < nodePathFragment1.length
        && overlapBlock < nodePathFragment2.length
        && nodePathFragment1[overlapBlock].equals(nodePathFragment2[overlapBlock])) {
      overlapBlock++;
    }

    return nodePathFragment1.length + nodePathFragment2.length - overlapBlock * 2;
  }
166281
protected static double distance( LineGeneral2D_F64 line , Point2D_I32 p ) {
		return Math.abs(line.A*p.x + line.B*p.y + line.C);
	}
1277608
public static void inferiorOrEqual(int a, int b)
    {
        if (a > b)
        {
            throw new LionEngineException(ERROR_ARGUMENT + String.valueOf(a) + ERROR_INFERIOR + String.valueOf(b));
        }
    }
1041012
public static final double distance(double lat1, double lon1, double lat2, double lon2)
    {
        checkLatitude(lat1);
        checkLongitude(lon1);
        checkLatitude(lat2);
        checkLongitude(lon2);
        if (
                (Math.abs(lat1 - lat2) > 100) ||
                (Math.abs(lon1 - lon2) > 100)
                )
        {
            return GreatCircle.distance(lat1, lon1, lat2, lon2);
        }
        double dep = departure(lat1, lat2);
        return 60*Math.hypot(
                lat1-lat2,
                dep*(lon1-lon2)
                );
    }