I'm sorry, from your wording, I guessed you had commented after I added the code to demonstrate what I meant. And
I added the code because the English "for each point checking distance of the following points only until the distance from origin has increased by your cutoff" didn't
make it completely clear that "checking distance" meant the distance between two data points and "increased by your cutoff" meant distance of the two points from the origin differing by the cutoff. And because sorting multiple arrays the same way with slices needed demonstration.