summaryrefslogtreecommitdiff
path: root/npc/functions/math.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-26 21:40:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-26 21:40:57 -0300
commit5730649cb1df93a3cae88313e96f443979430210 (patch)
treeea367ed7fe45f60ab5f897b549e363a07cb40f8d /npc/functions/math.txt
parent9050c51d647e9e32db39080c25f9d0e0a56b3216 (diff)
downloadserverdata-5730649cb1df93a3cae88313e96f443979430210.tar.gz
serverdata-5730649cb1df93a3cae88313e96f443979430210.tar.bz2
serverdata-5730649cb1df93a3cae88313e96f443979430210.tar.xz
serverdata-5730649cb1df93a3cae88313e96f443979430210.zip
Add Mirror Lake Vault Functionality. Along other required changes.
Diffstat (limited to 'npc/functions/math.txt')
-rw-r--r--npc/functions/math.txt18
1 files changed, 0 insertions, 18 deletions
diff --git a/npc/functions/math.txt b/npc/functions/math.txt
index 9c93fbb7..941dfa90 100644
--- a/npc/functions/math.txt
+++ b/npc/functions/math.txt
@@ -102,22 +102,4 @@ function script ponderate_avg {
return (.@h1+.@h2)/.@dd;
}
-// bitmask_count(<int>)
-// returns the number of bits set in <int> (max. 4096)
-
-function script bitmask_count {
- .@n = getarg(0); // Number evaluated
- .@p=0; // Bits set/unset
- .@s=0; // Stack and Check
- .@m=0; // Memory
-
- // Loop only as needed
- while (.@s < .@n) {
- .@s=2**.@m;
- if (.@n & .@s)
- .@p++;
- .@m++;
- }
- return .@p;
-}