square: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Square to square: Converting page titles to lowercase)
No edit summary
 
Line 5: Line 5:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: num = square(num)]
[h: num = square(num)]
[h: num = sqr(num)]
[h: num = sqr(num)]
</source>
</syntaxhighlight>


|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: square(5)]
[r: square(5)]
[r: square(6)]
[r: square(6)]
</source>
</syntaxhighlight>
Returns  
Returns  
     25
     25

Latest revision as of 17:42, 14 March 2023

square() Function

Returns the square of a number.

Usage

[h: num = square(num)]
[h: num = sqr(num)]

Examples

[r: square(5)]
[r: square(6)]

Returns

   25
36