TLO:Math

From the wonderful RedGuides Wiki

Access to information on Math type members

This TLO is added by MacroQuest

Forms

Type Member Description
math Math

Access to Types

Type Description
math This DataType performs various mathematical calculations. In the following members, n is any formula that consists of valid Operators.

Examples

/echo ${Math.Calc[3-1]}

Echoes 2.00

 /echo ${Math.Calc[49%6+25]}

Echoes the result of 49 modulo 6 + 25, or 1 + 25

  /echo ${Math.Sqrt[49]}

Echoes the square root of 49

  /echo ${Math.Rand[500]}

Echoes a random number between 1 and 500

Math.Rand now takes an optional min argument so you can get a random number between 2 variables.

  /echo ${Math.Rand[5,10]}

this would return a randum number between 5 and 10.


See also