This is a pretty simple and self explanatory command. You pass it a mathematical expression and it spits out the result.
Installation
To use it, you want to add the following to a command:$(urlfetch http://twitch.center/customapi/math?expr=$(querystring))
For example, you can have:!commands add !math $(urlfetch http://twitch.center/customapi/math?expr=$(querystring))
If you'd like to repeat the original query in the output, add a "$(query) = " before the urlfetch.
Examples
Extra detail
The command will return an error if no input is given, and will return "???" if it fails to parse the expression.
It supports:
- basic arithmetic operations (+, -, *, /, ^)
- trigonometric operations (sin, cos, tan, ...)
- basic functions such as round, sgn, abs, trunc, log, sqrt
- constants such as PI and E
Bugs and features
If you have any suggestions or bug reports, just leave a message in this thread and I'll try to address them.






