qsort problem ?

i have an muti array i want to rearrange them in new muti array , can you help me ?

my code :

mangc = #(#("Box018", 12563.78), #("Box034", 370.31), #("Box035", 6340.63), #("Box036", 9610.94), #("Box037", 12881.3))

fn sosanhmang v1 v2 =
(
local d = mangc[v1][2] - mangc[v2][2]

case of
(
(d < 0.): -1
(d > 0.): 1
default: 0
)
)
qSort mangc sosanhmang
mangc

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexnguyen's picture

thank

the answer is :
http://forums.cgsociety.org/showthread.php?f=98&t=1428607
thank you for your help

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.