Review and update the layout.

This commit is contained in:
Valentin Lorentz
2011-06-28 17:29:38 +02:00
parent 2ce465adcd
commit b17bd0fac6
63 changed files with 2384 additions and 2323 deletions

View File

@ -4,56 +4,57 @@
The Math plugin
===============
.. _command-base:
Conversion
----------
base <fromBase> [<toBase>] <number>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _command-math-base:
math base <fromBase> [<toBase>] <number>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Converts *<number>* from base *<fromBase>* to base *<toBase>*.
If *<toBase>* is left out, it converts to decimal.
.. _command-math-convert:
.. _command-rpn:
rpn <rpn math expression>
^^^^^^^^^^^^^^^^^^^^^^^^^
Returns the value of an RPN expression.
.. _command-convert:
convert [<number>] <unit> to <other unit>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
math convert [<number>] <unit> to <other unit>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Converts from *<unit>* to *<other unit>*. If number isn't given, it
defaults to 1. For unit information, see 'units' command.
Calculation
-----------
.. _command-icalc:
.. _command-math-rpn:
icalc <math expression>
^^^^^^^^^^^^^^^^^^^^^^^
math rpn <rpn math expression>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Returns the value of an RPN expression.
.. _command-math-icalc:
math icalc <math expression>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the same as the calc command except that it allows integer
math, and can thus cause the bot to suck up CPU. Hence it requires
the 'trusted' capability to use.
.. _command-math-units:
.. _command-units:
units [<type>]
^^^^^^^^^^^^^^
math units [<type>]
^^^^^^^^^^^^^^^^^^^
With no arguments, returns a list of measurement types, which can be
passed as arguments. When called with a type as an argument, returns
the units of that type.
.. _command-math-calc:
.. _command-calc:
calc <math expression>
^^^^^^^^^^^^^^^^^^^^^^
math calc <math expression>
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Returns the value of the evaluated *<math expression>*. The syntax is
Python syntax; the type of arithmetic is floating point. Floating
@ -61,4 +62,3 @@ point arithmetic is used in order to prevent a user from being able to
crash to the bot with something like '10**10**10**10'. One consequence
is that large values such as '10**24' might not be exact.