diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-03-02 16:15:02 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-03-02 16:15:02 -0300 |
commit | c957417e7a41248eb72178e6b385f187f1f00457 (patch) | |
tree | ba475ad84b6991ed0949682a7e9e42e9b4e88cf4 | |
parent | afc9162a334f1491c3f2424fa561bdb03c3e8dd5 (diff) | |
download | serverdata-c957417e7a41248eb72178e6b385f187f1f00457.tar.gz serverdata-c957417e7a41248eb72178e6b385f187f1f00457.tar.bz2 serverdata-c957417e7a41248eb72178e6b385f187f1f00457.tar.xz serverdata-c957417e7a41248eb72178e6b385f187f1f00457.zip |
Remove two unused array functions: Product and Quotient
-rw-r--r-- | npc/functions/array.txt | 35 |
1 files changed, 1 insertions, 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(<array>) -// 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(<array>) -// 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(<array>) // 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(<array>, <value>) // adds <value> to the end of the array |