EDIT: Please move this topic. I clicked the wrong link to get here.
I'm making a vector balls demo and I need to sort my balls based on their angle. Ones with the angle closest to 90 degrees should be rendered last. I know that there is a command to sort linked lists but I just can't seem to get it working. I know that I must impliment this function into my objects but the question is how. Given I have a list called balls and each ball has a direction variable how do I sort this by angular distance from 90 degrees?
|