Very fast TPoint sort
Source position: tpa.pas line 32
function FastTPASort(
const TPA: TPointArray;
const Dists: TIntegerArray;
maxDist: Integer;
CloseFirst: Boolean
):TPointArray;