mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 14:33:53 +01:00
12 lines
258 B
Plaintext
12 lines
258 B
Plaintext
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;
|
|
} |