graphdb/src/main/java/com/orientechnologies/orient/graph/sql/functions/OSQLFunctionHeuristicPathFinderAbstract.java
protected double getEuclideanHeuristicCost(double x, double y, double gx, double gy, double dFactor) {
        double dx = Math.abs(x - gx);
        double dy = Math.abs(y - gy);

        return (dFactor * Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)));
    }
protected double getEuclideanHeuristicCost(double x, double y, double gx, double gy, double dFactor) {
        double dx = Math.abs(x - gx);
        double dy = Math.abs(y - gy);

        return (dFactor * Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)));
    }
obtains from http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html