square: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by 2 users not shown)
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 23:59, 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