Sorting array of objects
in
Programming Questions
•
3 years ago
Honestly I don't really need to sort the array per se. All I need is to to be able to pick out the top 3 out of an array.
For example, an array of balls with Xposition, Yposition and Distance variables. I want to be able to identifiy the 3 closest balls to another ball.
Is there some sort of percentile algorithm?
For example, an array of balls with Xposition, Yposition and Distance variables. I want to be able to identifiy the 3 closest balls to another ball.
Is there some sort of percentile algorithm?
1
