MathPHP\NumericalAnalysis\Interpolation\Interpolation::sort PHP 메소드

sort() 보호된 정적인 메소드

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
리턴 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;
    }