From c957417e7a41248eb72178e6b385f187f1f00457 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 2 Mar 2020 16:15:02 -0300 Subject: Remove two unused array functions: Product and Quotient --- npc/functions/array.txt | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/npc/functions/array.txt b/npc/functions/array.txt index 1bc54610d..d433abd71 100644 --- a/npc/functions/array.txt +++ b/npc/functions/array.txt @@ -215,40 +215,6 @@ function script array_difference { -// array_product() -// return the product of every element of the array - -function script array_product { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@prod *= getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@prod; -} - - - -// array_quotient() -// return the product of every element of the array - -function script array_quotient { - .@size = getarraysize(getarg(0)); - freeloop(true); - - for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { - .@quot /= getelementofarray(getarg(0), .@i); - } - - freeloop(false); - return .@quot; -} - - - // array_shift() // returns the first element of the array and removes it, while shifting left @@ -298,6 +264,7 @@ function script array_pop { } + // TODO: Rename to array_append >.< // array_push(, ) // adds to the end of the array -- cgit v1.2.3-70-g09d2