diff options
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 516454365..2cbeff37b 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -8536,6 +8536,18 @@ Example: --------------------------------------- +*cap_value(<number>, <min>, <max>) + +Returns the number but capped between <min> and <max>. + +Example: + // capped between 0 ~ 100 + .@value = cap_value(10, 0, 100); // .@value will be equal to 10 + .@value = cap_value(1000, 0, 100); // .@value will be equal to 100 + .@value = cap_value(-10, 3, 100); // .@value will be equal to 3 + +--------------------------------------- + *md5("<string>") Returns the md5 checksum of a number or string. |