SquareRoot (Float function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(32 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This [[Intrinsic classes|intrinsic]] function returns a number that is the [http://en.wikipedia.org/wiki/Square_root square root] of the method object.
{{Template:Float:SquareRoot subtitle}}
An attempt to get the square root of a negative number results in request cancellation.


SquareRoot is available as of version 7.2 of the [[Sirius Mods]].
The <var>SquareRoot</var> [[Intrinsic classes|intrinsic]] 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.
===SquareRoot syntax===
  %value = number:squareRoot
====Syntax terms====
<dl>
<dt>%value
<dd>A variable to receive the square root of the method object.
<dt>number
<dd>A Float value.
</dl>
===Examples===
The following displays the square root of 3.14159:
    printText {3.14159:squareroot}
The following displays the square root of the number in ''%x'':
    printText {%x:squareroot}


===See also===
==Syntax==
[[List of Intrinsic Float Methods]]
{{Template:Float:SquareRoot syntax}}
[[Category: Intrinsic Float methods|SquareRoot function]]
[[Category:Intrinsic methods]]
[[Category:System methods]]


===Syntax terms===
<table class="syntaxTable">
<tr><th>%number</th>
<td>A variable to receive the square root of the method object. </td></tr>


<tr><th>float</th>
<td>A <var>Float</var> value.</td></tr>
</table>


<!--
==Usage notes==
<section begin=dpl_desc />
<ul>
Square root of a number
<li><var>SquareRoot</var> is available as of <var class="product">Sirius Mods</var> Version 7.2.
<section end=dpl_desc />
</ul>
-->
 
==Examples==
<ol>
<li>The following displays the square root of <code>3.14159</code>:
<p class="code">[[PrintText statement|printText]] {3.14159:squareroot}
</p>
 
<li>The following displays the square root of the number in <code>%x</code>:
<p class="code">printText {%x:squareroot}
</p></ol>
 
==See also==
{{Template:Float:SquareRoot footer}}

Latest revision as of 18:09, 2 November 2012

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

  • SquareRoot is available as of Sirius Mods Version 7.2.

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