Execute math expressions in the server or console on PocketMine-MP servers with /calculator command
- List of supported arithmetic operators:
/,*,+,-,**,%. - Description of arithmetic operators: https://github.com/Muqsit/arithmexp/wiki/Operator
- Eg:
/calculator 1 + (2 - 3) * 4 / 5> Result:0.2
- List of supported constants:
e,euler,false,inf,log2e,log10e,ln2,ln10,lnpi,pi,nan,pi2,pi4,m_1pi,m_2pi,m_2sqrtpi,sqrtpi,sqrt2,sqrt3,sqrt12,true. - Description of constants: https://github.com/Muqsit/arithmexp/wiki/Constant
- Eg:
/calculator 3**2 * pi> Result:28.2
- List of supported math functions:
abs(),acos(),acosh(),asin(),asinh(),atan2(),atan(),atanh(),boolval(),ceil(),cos(),cosh(),deg2rad(),exp(),expm1(),fdiv(),floatval(),floor(),fmod(),hypot(),intdiv(),intval(),is_bool(),is_float(),is_finite(),is_infinite(),is_nan(),lcg_value(),log10(),log1p(),log(),max(),min(),mt_getrandmax(),mt_rand(),pi(),pow(),rad2deg(),round(),sin(),sinh(),sqrt(),tan(),tanh(). - Description of math functions: https://github.com/Muqsit/arithmexp/wiki/Function
- Eg:
/calculator sqrt(369)> Result:19.2
- List of supported operator:
+,/,==,**,>,>=,===,<,<=,&&,||,and,or,xor,%,*,!=,!==,<=>,-,!,-,+. - Description of operator: https://github.com/Muqsit/arithmexp/wiki/Operator
- Eg:
/calculator 1 + 2 == 3> Result:true
commands:
calculator:
description: "Perform a math operation"
usage: "/calculator <expression>"
permission: calculator.command
aliases: ["calc"]
permissions:
calculator.command:
default: true
description: "Allows the use of /calculator"---
# Prefix of messages.
prefix: "&f[&6Calculator&f]&r"
# {prefix} : Prefix.
# {result} : The result of the math.
result: "{prefix} &aResult: &b{result}"
# {prefix} : Prefix.
# {error} : Error information.
error: "{prefix} &cError: {error}"
# playSound: true > A sound will be sent to the player when a math expressions is performed.
playSound: true
# showDataType: true > The data type will be displayed with the result.
showDataType: true
# Config version
configVersion: "0.0.15"
...
