### Simple Bukkit Calculator

Simple Bukkit Calculator

This is a plugin that allows you to do calculations ingame!

It can be useful when you don't want to use your systems calculator.

It has many operations: addition, subtraction, multiplication, division, exponents, roots, absolute value, sine, cosine, tangent, and their hyperbolic types.

Commands:

/add <addend> <addend>

/subtract <minuend> <subtrahend>

/multiply <multiplicand> <multiplier>

/divide <dividend> <divisor>

/exponent <base number> <exponent>

/root <degree> <radicand>

/sqrt <radicand>

/cbrt <radicand>

/square <base number>

/cube <base number>

/abs <number>

/sin <number>

/cos <number>

/tan <number>

/sinh <number>

/cosh <number>

/tanh <number>

Permissions:

calculator.addition - Can use /add

calculator.subtraction - Can use /subtract

calculator.multiplication - Can use /multiply

calculator.division - Can use /divide

calculator.exponent - Can use /exponent

calculator.root - Can use /root

calculator.sqrt - Can use /sqrt

calculator.cbrt - Can use /cbrt

calculator.square - Can use /square

calculator.cube - Can use /cube

calculator.abs - Can use /abs

calculator.sin - Can use /sin

calculator.cos - Can use /cos

calculator.tan - Can use /tan

calculator.sinh - Can use /sinh

calculator.cosh - Can use /cosh

calculator.tanh - Can use /tanh

Notes:

-For any operation, you can use "E". Such as "9E4" would be short for 90000 because 9 * 10^4 = 90000 or simply this is a shorter scientific notation.

-Adding "F" after a number will change it to a float. E.G. "54375.43543F".

-The trigonometric functions take in radians not angles

Would you be interested in posting the source code on github or something? I'm interested in forking for use on my server.

You should probably add the calculator.startmessage node to the perm list.

New commands will be added as soon as file is approved by BukkitDev staff.

@5chris100

I'll work on it. :)

Very nice! I can possibly use the addition/subtraction functions for position calculations. Could you possibly add a command that moves the selection positions for WorldEdit, such as: "/pos1add 18 7 129" would move my first selection position 18 blocks east, 7 blocks up, and 129 blocks south. Same goes for "/pos2add" and "/pos[1/2]sub[tract]". :)

@Louis1234567890987654321

I have that already done, but I will release it later.

cube root=java.lang.Math.cbrt(double d) square=x*x cube=x*x*x

@Goblom

If these are your homework tasks, I suggest that you go to school instead of browsing this forum;)

Interesting.... I can now do a few problems on my homework while playing my favorite game