SquareRoot (Float function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax diagram to template; fix tags and links)
Line 1: Line 1:
{{Template:Float:SquareRoot subtitle}}
{{Template:Float:SquareRoot subtitle}}


This [[Intrinsic classes|intrinsic]] function returns a number that is the [http://en.wikipedia.org/wiki/Square_root square root] of the method object.
The <var>SquareRoot</var> <var>[[Intrinsic classes|intrinsic]]</var> function returns a number that is the [http://en.wikipedia.org/wiki/Square_root square root] of the method object. An attempt to obtain the square root of a negative number results in request cancellation.
An attempt to get the square root of a negative number results in request cancellation.


<var>SquareRoot</var> is available as of version 7.2 of the <var class=product>Sirius Mods</var>.
==Syntax==
==Syntax==
{{Template:Float:SquareRoot syntax}}
{{Template:Float:SquareRoot syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%value</th>
<tr><th>%number</th>
<td>A variable to receive the square root of the method object. </td></tr>
<td>A variable to receive the square root of the method object. </td></tr>
<tr><th>number</th>
<tr><th>float</th>
<td>A <var>Float</var> value.</td></tr>
<td>A <var>Float</var> value.</td></tr>
</table>
</table>
==Usage notes==
<ul><li><var>SquareRoot</var> is available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.2.</ul>
==Examples==
==Examples==
The following displays the square root of 3.14159:
<ol><li>The following displays the square root of <code>3.14159</code>:
<p class="code">printText {3.14159:squareroot}
<p class="code">printText {3.14159:squareroot}
</p>
</p>
The following displays the square root of the number in ''%x'':
<li>The following displays the square root of the number in <code>%x</code>:
<p class="code">printText {%x:squareroot}
<p class="code">printText {%x:squareroot}
</p></ol>


</p>
==See also==
==See also==
{{Template:Float:SquareRoot footer}}
{{Template:Float:SquareRoot footer}}

Revision as of 05:50, 4 February 2011

Square root of a number (Float class)


The SquareRoot intrinsic function returns a number that is the square root of the method object. An attempt to obtain the square root of a negative number results in request cancellation.

Syntax

%number = float:SquareRoot

Syntax terms

%number A variable to receive the square root of the method object.
float A Float value.

Usage notes

Examples

  1. The following displays the square root of 3.14159:

    printText {3.14159:squareroot}

  2. The following displays the square root of the number in %x:

    printText {%x:squareroot}

See also