mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 14:33:53 +01:00
13 lines
276 B
Plaintext
13 lines
276 B
Plaintext
|
function ds_priority_to_list(priority, asc = true) {
|
||
|
var l = ds_list_create();
|
||
|
var amo = ds_priority_size(priority);
|
||
|
|
||
|
repeat(amo) {
|
||
|
if(asc)
|
||
|
ds_list_add(l, ds_priority_delete_min(priority));
|
||
|
else
|
||
|
ds_list_add(l, ds_priority_delete_max(priority));
|
||
|
}
|
||
|
|
||
|
return l;
|
||
|
}
|