The fastest calculator around; built right into your chat; just type in and youll see your answer! This is a complete revamp of the mod ChatCalc by Kokeria, which is most likely abandoned. This mod features almost everything youd need in a calculator, and if you want something to be added, just ask!
Usage
Firstly, I should clarify how you use ChatCalc, simply type an expression into chat, and it'll show the answer above. If you need to get the answer in text, just press tab. If you need the answer and the expression, type an equals sign and press tab.
Features
Tooltip displays answer above expression.
Supports basic arithmetic operations.
Custom functions and constants can be defined.
Functions can support multiple parameters.
Configurable settings for output format and display options.
How to Use
ChatCalc evaluates expressions separated by spaces. You can type one thing beside another and ChatCalc will work fine as long as there are spaces in between.
Custom Functions and Constants
You can define your own functions and constants using the following syntax:
f(z)=2z-1 to define a function.
c=sqrt(2)/2 to define a constant.
Use f(z)= and c= to remove functions and constants.
Config Settings
ChatCalc features several config settings:
radians: Toggle radians mode.
decimal_format: Change output format.
chat_history: Store previously evaluated expressions.
- you can define multiple functions under the same name with different parameter counts
- fixed recursion issue
- added sum and product functions `sum(n=0;12;n)` as an example
- fixed #11 by changing the completable future issue
- you can define multiple functions under the same name with different parameter counts
- fixed recursion issue
- added sum and product functions `sum(n=0;12;n)` as an example
- fixed #11 by changing the completable future issue
- setting functions to not exist now works correctly
- copy to clipboard on defined functions
- added `sgn` function
- added a terrible `factorial` function
- fixed a bug with negative signs not working
- reworked the math engine logic
- changed `random()` and `rand()` to be `rand` and `random`
- added custom constants
- setting functions to not exist now works correctly
- copy to clipboard on defined functions
- added `sgn` function
- added a terrible `factorial` function
- fixed a bug with negative signs not working
- reworked the math engine logic
- changed `random()` and `rand()` to be `rand` and `random`
- added custom constants
- Added `yaw` and `pitch` variables
- Fixed bug with inverse trig functions
- Fixed bug for crashing with `=` being tabbed
- Made exponentials read a term instead of a part (meaning that `2^3*2` is now the same as `2^(3*2)`, however, `2^3+3` is still `(2^3)+3`; originally Chat Calc would read `(2^3)*2`)
- rewrote the entire function system to let me have multivariable functions
- your input will not compute rather than giving back "NaN" if your syntax is incorrect
- added cfg? to give you a list of the config options
- fixed existing code that had logic issues, "1+2)/3" is now equal to 1 instead of 3
- refactored config system so it doesn't break when i add new features now
- fixed issue #6 by making a new option (calculate_last, on by default) that puts calculations after tabbing in entries like commands and usernames (well I haven't tested usernames but it shouldn't go first)
- because of the fix, ive removed the euler config option, existing always since the issue beforehand is that you can commonly type in 'e' and it gives you a number instead of what you want
- the only things i see left are to add new features, so if you have anything, feel free to ask
- fixed issue where every number was e
- added feature for sin^a(b)
- fixed radians and degrees being swapped