pow: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial write-up.)
 
m (Redirected to power.)
Line 1: Line 1:
{{MacroFunction
#REDIRECT [[power]]
|name=pow
[[Category:Macro Function]]
|version=1.3b36
|description=
Returns a number raised to the power of {{code|2}}, or raised to a specific ''n-th'' power.
 
|usage=
<source lang="mtmacro" line>
pow(num)
</source>
<source lang="mtmacro" line>
pow(num, exp)
</source>
'''Parameters'''
* {{code|num}} - the base number used to perform the operation.
* {{code|exp}} - the exponent used in the operation.
 
|examples=
Use {{code|pow()}} to raise {{code|5}} to the power of {{code|2}}:
<source lang="mtmacro" line>
[r: pow(5)]
</source>
Returns: {{code|25}}
 
Use {{code|pow()}} to raise {{code|5}} to the power of {{code|3}}:
<source lang="mtmacro" line>
[r: pow(5, 3)]
</source>
Returns: {{code|125}}
}}
[[Category:Mathematical Function]]
[[Category:Mathematical Function]]

Revision as of 08:06, 9 March 2009

Redirect to: