Math


General

Allows for easy math combinations to be done right from discord!


Usage

math (Operation)

The operation must be a valid math operation otherwise this will not work.


Permissions

Anyone in the guild may use this.


Limitations

This command may only be used every 5 seconds.


Examples


Operations

Addition
eg. 5 + 3 = 7

Subtraction
eg.
16 - 23 = -7

Negation
eg.
!0 = 1
not 1 = 0

Percent
eg.
5% = 0.05

Exponentiation
eg.
5^2 = 25
pow(6,2) =36

Factorial
eg. 4! = 24

Modulus
eg.
6 % 5 = 1
mod(7,5) = 2

Multiplication
eg.
6 * 3 = 18

Division
eg.
9 / 2 = 4.5

Comparisons
eg. 
6 > 5 = 1
32 >= 33 = 0
23 <= 23 = 1
18 < 17 = 0
5 = 5 = 1
4 == 3 = 0
4 !=8 = 1

Conditions
eg.
6 != 5 && 3 == 3 = 1
55 == 54 and 8 == 8 = 0
16 == 16 or 5 == 4 = 1
14 == 14 or 13 == 13 = 1
Max(a, b, c...)
Returns the highest value.
eg. max(6, 4, 5) = 6
Min(a, b, c...)
Returns the lowest value.
eg. min(6, 4, 5) = 4
Sqrt(a)
Returns the square root of a.
eg. sqrt(25) = 5
Cbrt(a)
Returns the cube root of a.
eg. cbrt(125) = 5
Round(a)
Rounds the number.
eg. round(0.5) = 1
Floor(a)
Rounds the number to the floor.
eg. floor(6.32) = 6
Ceil(a)
Rounds the number to the ceiling.
eg. floor(6.32) = 7
Root(a, b)
Calculates the root a of b.
eg. root(2, 9) = 3
Abs(a)
Returns an absolute value.
eg. abs(-6) = 6
Trigonometry
cos(a)
sin(a)
tan(a)
acos(a)
asin(a)
atan(a)
Back to top