mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-27 07:26:33 +01:00
12 lines
No EOL
258 B
Text
12 lines
No EOL
258 B
Text
function ds_stack_to_array(stack) {
|
|
var len = ds_stack_size(stack);
|
|
var _st = array_create(len);
|
|
|
|
for( var i = 0; i < len; i++ )
|
|
_st[len - i - 1] = ds_stack_pop(stack);
|
|
|
|
for( var i = 0; i < len; i++ )
|
|
ds_stack_push(stack, _st[i]);
|
|
|
|
return _st;
|
|
} |