5 //.float(entity,entity) sort_cmp;
6 class(Sort) .entity sort_next, sort_prev;
11 * Swap two neighbours in a sortlist.
12 * @param a FIRST entity
13 * @param b entity after a
15 #define SORT_SWAP(a,b) \
16 b.sort_prev = a.sort_prev; \
17 a.sort_next = b.sort_next; \
18 if(b.sort_next) b.sort_next.sort_prev = a; \
19 if(a.sort_prev) a.sort_prev.sort_next = b; \