pow: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial write-up.)
 
m (Conversion script moved page Pow to pow: Converting page titles to lowercase)
 
(3 intermediate revisions by 2 users not shown)
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]]

Latest revision as of 23:59, 9 February 2023

Redirect to: