MathPHP\NumericalAnalysis\NumericalIntegration\NumericalIntegration::sort PHP Method

sort() protected static method

Sorts our coordinates (arrays) by their x-component (first number) such that consecutive coordinates have an increasing x-component.
protected static sort ( array $points ) : array
$points array
return array
    protected static function sort(array $points) : array
    {
        $x = self::X;
        usort($points, function ($a, $b) use($x) {
            return $a[$x] <=> $b[$x];
        });
        return $points;
    }