src/Rasterization/Path/SVGBezierApproximator.php
private static function getDistanceSquared($p1, $p2)
    {
        $dx = $p2[0] - $p1[0];
        $dy = $p2[1] - $p1[1];

        return $dx * $dx + $dy * $dy;
    }
private static function getDistanceSquared($p1, $p2)
    {
        $dx = $p2[0] - $p1[0];
        $dy = $p2[1] - $p1[1];

        return $dx * $dx + $dy * $dy;
    }
private static function getDistanceSquared ( $ p1 , $ p2 ) { $ dx = $ p2 [ 0 ] - $ p1 [ 0 ] ; $ dy = $ p2 [ 1 ] - $ p1 [ 1 ] ; return $ dx * $ dx + $ dy * $ dy ; }
Calculates the squared distance between two points.

The squared distance is defined as d = (x1 - x0)^2 + (y1 - y0)^2.

@param float[] $p1 The first point (0 => x, 1 => y).
@param float[] $p2 The second point (0 => x, 1 => y).

@return float The squared distance between the two points.
Calculates the squared distance between two points .