By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.
OK, Don't show this again
Execute math expressions in the server or console on PocketMine-MP servers with /calculator
command
/
, *
, +
, -
, **
, %
./calculator 1 + (2 - 3) * 4 / 5
> Result: 0.2
e
, euler
, false
, inf
, log2e
, log10e
, ln2
, ln10
, lnpi
, pi
, nan
, pi2
, pi4
, m_1pi
, m_2pi
, m_2sqrtpi
, sqrtpi
, sqrt2
, sqrt3
, sqrt12
, true
./calculator 3**2 * pi
> Result: 28.2
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()
./calculator sqrt(369)
> Result: 19.2
+
, /
, ==
, **
, >
, >=
, ===
, <
, <=
, &&
, ||
, and
, or
, xor
, %
, *
, !=
, !==
, <=>
, -
, !
, -
, +
./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"
...
Update arithmexp library version from 0.1.30
to 1.0.0
>
>=
<
<=
<=>
==
!=
===
!==
) (#9) (427e2f4
)!
&&
||
and
or
xor
) (#9) (77f988c
)is_bool
is_float
is_finite
is_infinite
is_nan
boolval
intval
floatval
) (fdcb6ce
)Update arithmexp library version from 0.1.30
to 1.0.1
<=>
) cannot be stringified (73fe866
)muqsit/arithmexp
to 0.1.30
NhanAZ/libBedrock
to 1.0.0
muqsit/arithmexp
to 0.1.29
80ceccf
)6d0c799
)(a % n) % n
=> a % n
) (bca7b17
, 9853547
)rand()
and getrandmax()
(these functions exist in PHP only for backward compatibility) (ce8dfb3
)mt_rand()
now accepts zero parameters (in addition to accepting two parameters) (8194bf3
, f73be61
)round()
(HALF_UP
, HALF_DOWN
, HALF_EVEN
, HALF_ODD
) (c21ce74
, 90c0f5d
)FunctionRegistry::register()
to FunctionRegistry::register()
(ad07641
)ConstantRegistry::register()
to ConstantRegistry::registerLabel()
(1b0d2d5
)FunctionRegistry::registerMacro()
to MacroRegistry::registerFunction()
(0d0889f
)MacroRegistry::registerObject()
(34e5ad7
)muqsit/arithmexp
to 0.1.26
Parser::getOperatorManager()
(4ff725f
)Parser::getBinaryOperatorRegistry()
with Parser::getOperatorManager()->getBinaryRegistry()
Parser::getUnaryOperatorRegistry()
with Parser::getOperatorManager()->getUnaryRegistry()
1ef49eb
, db1df91
, 03440ab
, b9dd31e
, 3c9b8a0
, 14442ca
, 082ccf3
)4ff725f
)0 / 0
returning int(0)
with optimizations (1672970
)bd08609
)muqsit/arithmexp
to 0.1.25
aa71629
)65290a6
)32cf8f4
)muqsit/arithmexp
to 0.1.24
[]
and curly brackets {}
are now considered as valid in expressions)muqsit/arithmexp
to 0.1.23
FunctionRegistry::register()
(d003841
)2bf277e
, ff81320
)da21685
, ff81320
)lvalue=0
resulted in rvalue
instead of -rvalue
(#11, 4f4aaea
, 029e470
)nhanaz-pm-pl/libBedrock
to 0.0.2
muqsit/arithmexp
to 0.1.22
a ** m / a ** n = a ** (m - n)
) in strength reduction optimization (757e7b0
)8891458
)min(pi())
) (4d33414
)muqsit/arithmexp
to 0.1.21
Expression::getVariables()
has been renamed to Expression::findVariables()
2
with itself resulted expression executing indefinitelymuqsit/arithmexp
to 0.1.20
muqsit/arithmexp
to 0.1.19
muqsit/arithmexp
to 0.1.18
muqsit/arithmexp
to 0.1.17
BinaryOperators
can now be checked for commutativity through BinaryOperator::isCommutative()
muqsit/arithmexp
to 0.1.16
x - x
to 0
1 ** x
to 1
Parser::parseRawExpression()
Parser::createUnoptimized()->parse()
may be used insteadmuqsit/arithmexp
to 0.1.15
Reply to review by :
You can leave one review per plugin release, and delete or update your review at any time