Calculate Pythagoras distance.

Pythagorus as described as "a^2 + b^2 = c^2"

@param PointInterface $a First point
@param PointInterface $b Last point

@return float
181195
protected function pythagorus( PointInterface $a, PointInterface $b )
    {
        list( $ax, $ay ) = $a->getCoordinates();
        list( $bx, $by ) = $b->getCoordinates();
        return pow($ax - $bx, 2) + pow($ay - $by, 2);
    }
789480
protected static double distanceSq(double[] a, double[] b) {
		double sum = 0;
		for (int i = 0; i < a.length; i++) {
			double d = a[i]-b[i];
			sum += d*d;
		}
		return sum;
	}
1356225
public static final double distance(Point p1, Point p2)
    {
        return Math.hypot(p1.getX() - p2.getX(), p1.getY() - p2.getY());
    }
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);
    }
306789
def distance_tt_point(a, b):
    
    return math.sqrt((b.lat-a.lat)**2 + (b.lon-a.lon)**2)
998491
def distance_to_point2(self, p2: "Point2") -> Union[int, float]:
        
        return ((self[0] - p2[0]) ** 2 + (self[1] - p2[1]) ** 2) ** 0.5
664496
public function distance(array $a, array $b): float
    {
        if (count($a) !== count($b)) {
            throw InvalidArgumentException::arraySizeNotMatch();
        }

        $distance = 0;
        $count = count($a);

        for ($i = 0; $i < $count; ++$i) {
            $distance += pow(abs($a[$i] - $b[$i]), $this->lambda);
        }

        return (float)pow($distance, 1 / $this->lambda);
    }
867986
public static function getDistance(Point $point1, Point $point2)
	{
		$latFrom = deg2rad($point1->latitude);
		$lonFrom = deg2rad($point1->longitude);
		$latTo = deg2rad($point2->latitude);
		$lonTo = deg2rad($point2->longitude);

		$lonDelta = $lonTo - $lonFrom;
		$a = pow(cos($latTo) * sin($lonDelta), 2) + pow(cos($latFrom) * sin($latTo) - sin($latFrom) * cos($latTo) * cos($lonDelta), 2);
		$b = sin($latFrom) * sin($latTo) + cos($latFrom) * cos($latTo) * cos($lonDelta);
		$angle = atan2(sqrt($a), $b);

		return $angle * self::EARTH_RADIUS;
	}
174143
protected function distanceBetweenPoints(
        PointInterface $head,
        PointInterface $tail
    ) {
        return sqrt(self::pythagorus($head, $tail));
    }
1370853
public function add($a, $b)
    {
        $a = $this->convert($a);
        $b = $this->convert($b);

        switch ($this->arbitrate($a, $b)) {
            case 'int':
                return $this->calcEngine->intAdd($a, $b);
            case 'float':
                return $this->calcEngine->floatAdd($a, $b);
            case 'whole':
                return $this->calcEngine->wholeAdd($a, $b);
            case 'natural':
                return $this->calcEngine->naturalAdd($a, $b);
            case 'rational':
                return $this->calcEngine->rationalAdd($a, $b);
            case 'complex':
                return $this->calcEngine->complexAdd($a, $b);
            case 'complex:numeric':
                return $this->calcEngine->complexAdd($a, $b->asComplex());
            case 'numeric:complex':
                return $this->calcEngine->complexAdd($a->asComplex(), $b);
        }
    }
666409
private static double distance(double[] pointA, double [] pointB) {
		double distance = 0.0;
		for (int i = 0; i < pointA.length; i++) {
			double d = pointA[i] - pointB[i];
			distance += d * d;
		}
		return Math.sqrt(distance);
	}
285125
public function computeUsingBcMath(DecimalNumber $a, DecimalNumber $b)
    {
        $precision1 = $a->getPrecision();
        $precision2 = $b->getPrecision();
        return new DecimalNumber((string) bcadd($a, $b, max($precision1, $precision2)));
    }
807127
public function compute(array $a, array $b) : float
    {
        $deltas = [];

        foreach ($a as $i => $value) {
            $deltas[] = abs($value - $b[$i]);
        }

        return max($deltas);
    }
1021860
public function compute($a, $b)
    {
        $score = 2 * Product::scalar($a, $b);
        $squares = Product::scalar($a, $a) + Product::scalar($b, $b);
        $result = exp(-$this->gamma * ($squares - $score));

        return $result;
    }
733775
public static double distanceWithDivisionSquared(double[] pointA, double dA) {
		double distance = 0.0;
		for (int i = 0; i < pointA.length; i++) {
			double d = pointA[i] / dA;
			distance += d * d;
		}
		return distance;
	}
1133138
def _distance_squared(self, p2: "Point2") -> Union[int, float]:
        
        return (self[0] - p2[0]) ** 2 + (self[1] - p2[1]) ** 2
602365
function (a, b) {                                                               // 504
  a = pointToArray(a);                                                                                        // 505
  b = pointToArray(b);                                                                                        // 506
  var x = a[0] - b[0];                                                                                        // 507
  var y = a[1] - b[1];                                                                                        // 508
  if (_.isNaN(x) || _.isNaN(y))                                                                               // 509
    return null;                                                                                              // 510
  return Math.sqrt(x * x + y * y);                                                                            // 511
}