Game Development Community

Sorting a Vector

by Colossai Studios · in Torque Game Engine · 05/30/2005 (8:56 am) · 2 replies

I have a Vector with structures containing among other things a fitness value. I need to sort the Vector based on this, but Torque's vector class doesn't contain a sort function. How can this be achieved?

#1
05/30/2005 (9:47 am)
Grep for dQsort for examples of how this is done. It's a neat little trick.
#2
02/08/2007 (9:40 pm)
Nice! Just what I was looking for.

Thanks,
Ben

I know it has been a year, but hey this engine has everything. Yah, yah, C++ standard, but I didn't know C++ has this.