SimpleCalc
SimpleCalc
Description:
SimpleCalc is a chat/console based calculator. It can calculate any mathematical expression containing decimals and the following operators:
- Addition: +
- Subtraction: -
- Multiplication: *
- Division: /
- Powers: ^
- Remainder: %
- Parentheses: ( and )
- ANS variable
- Functions: sin, cos, log, ln, sqrt, spawnX/Y/Z, locX/Y/Z
- Math constants: pi, e
Here are some examples of propper expressions:
- 5.6+3.3 or 5,6+3,3
- 3*4+5
- (3+4)*3/8
- (7+2^4)/3
- -5*3
- (-7+3*(12%5))/32
- After executing one calculation: ANS()+3
To use pi and the loc and spawn functions, append () to them!
You can separate the numbers/operators with spaces or not, both will be accepted and, if the expression is valid, will be calculated. The parantheses in ANS() are needed to work!
If you have Spout installed and use the Spoutcraft client you can now open a Calculator Window by using "/calc" without any arguments!
Command(s):
Quote:/calc <expression>: Calculates the given mathematical expression
Alias: /scalc <expression>
Quote:/calc: If Spout is installed it opens the Calculator Panel (needs Spoutcraft Client), else views the help
Alias: /scalc
DEV Version:
Download & Source:
SimpleCalc is released under GNU GPLv3 for more information, refer here.
CB 1.1-R6 and Newer:
Download v 2.4
Mirror(BukkitDev)
Download v2.3
CB 1.1-R3/CB 1.1-R4:
v2.2 (BukkitDev)
CB#
1185 & CB#
1240:
Download v 2.1
Mirror(BukkitDev)
Download v 2.0
Mirror(BukkitDev)
Source:
Source on GitHub
TO-DO:
Changelog:
- v2.4
- Fixed Listener throwing errors when spout was not installed
- Fixed loading errors if spout was not installed
- Added two new functions: distance2D() and distance3D(). It calculates the distance between the player and the spawn location either in the xz-plane(2D) and in xyz(3D)
- Added possibility to use the keyboard while the GUI is open to enter an expression, but currently no capital letters are possible if the text field is not selected.
- Added a Key-Binding when Spout is installed to open the GUI without the need to enter the command /calc. Default is C but it can be changed by the user!
- v2.3
- Added variables: You can now set variables with /calc set <variable> <value>. A variable is any letter except small e. Like: a,B,Z,O and g
- Added more functions like: sin, cos, sqrt, ln....
- Added SpawnX(), SpawnY(), SpawnZ() and LocX(), LocY(), LocZ() to get the locations of the spawn from your current world and your current location. This does only work when used ingame from a player!
- Added "Sience" window to the gui to use the new functions.
- v2.2
- Updated to new EventSystem
- Added ANS function.
- Rearranged CalcWindow
- v2.1:
- Change in namespace
- Made the error messages a bit more specific.
- v2.0:
- BUGFIX: Commas threw an error instead of beeing accepted
- FEATURE: Spout support. You can now use /calc to open a Calculator Window
- Update to CB #1185
- v1.0:
- Initial release
Version 0.1 to 0.9 are merely a list of my development progression:
- v0.1:
- Initial start of coding the plugin
- v0.2:
- Added all math functions i thought would be nice to have
- v0.3:
- Added RegEx functions for normal 2 arguments calculation (this means we do have a working 2 values calculator \o/)
- v0.4:
- Started working on a parser to make complex calculations possible
- v0.5:
- Removed original RegEx functions
- Created logic for the parser
- v0.6:
- Created logic to compute the given equation
- v0.7:
- Created my own Exception class to pass through parser errors
- v0.8 and v0.9:
- Several bug fixes and corrections
@xXZymosisXx
Are you using Spoutcraft too? (i guess so as you can see the window). Which version of Spout/SpoutCraft are you using. I haven't updated in while, there might be changes in the SpoutAPI i haven't implemented/adjusted to yet.
Any button I press with Spout says "Unknown command. Type "help" for help." Also, no numbers or anything appears on my calculator :( I'm using Spout btw.
Pretty nice. <3 it...
Wohoooo!
Over 100 Downloads. Thanks for trying/using(?) SimpleCalc. Pls post a comment if you like it or not(and maybe why not
^^
) if you got time.