diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-09-24 10:06:09 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-09-24 10:06:09 -0300 |
commit | 57a8319e2c6ab32087a1e3806c587aab709855df (patch) | |
tree | 9d8ded384560d6ef2965d4f6e9f07742afbe6675 /npc/functions/math.txt | |
parent | 2a64f8c25598a7f2e374eefb5a9bf93680b72708 (diff) | |
download | serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.gz serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.bz2 serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.tar.xz serverdata-57a8319e2c6ab32087a1e3806c587aab709855df.zip |
Bugfixes (Already meaning to, since last night)
Diffstat (limited to 'npc/functions/math.txt')
-rw-r--r-- | npc/functions/math.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/npc/functions/math.txt b/npc/functions/math.txt index fc27bec40..22cf88159 100644 --- a/npc/functions/math.txt +++ b/npc/functions/math.txt @@ -79,6 +79,16 @@ function script is_between { } +// result is: lower < target <= higher +// is_between ( lower, target, higher) +function script is_between2 { + .@min=getarg(0); + .@val=getarg(1); + .@max=getarg(2); + return (.@min < .@val && .@val <= .@max); +} + + // forces the equation: lower <= target <= higher. // Note it still works if higher and target values are swapped. // limit ( lower, target, higher) |