Absolute (Float function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (match syntax diagram to revised template; fix tags.) |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:Float:Absolute subtitle}} | |||
The <var>Absolute</var> [[Intrinsic classes|intrinsic]] function operates on a <var>Float</var> object and returns a number that is the absolute value of the method object. | |||
< | |||
< | |||
=== | ==Syntax== | ||
{{Template:Float:Absolute syntax}} | |||
===Syntax terms=== | |||
<table class="syntaxTable"> | |||
<tr><th>%number</th><td>A variable to receive the numeric result of the <var>Absolute</var> method.</td></tr> | |||
<tr><th>float</th><td>A <var>Float</var> value.</td></tr> | |||
</table> | |||
=== | ==Usage notes== | ||
[[ | <ul><li>The <var>Absolute</var> function is available as of <var class="product">[[Sirius Mods]]</var> Version 7.3</ul> | ||
==Examples== | |||
<ol><li>The following statement places into %y the absolute value of the number in %x: | |||
<p class="code">%y = %x:absolute | |||
</p> | |||
<li>The following statement returns 6.4 to %y: | |||
<p class="code">%y = -6.4:absolute | |||
</p></ol> | |||
==See also== | |||
{{Template:Float:Absolute footer}} | |||
Absolute | |||
Latest revision as of 06:12, 3 February 2011
Absolute value of a number (Float class)
The Absolute intrinsic function operates on a Float object and returns a number that is the absolute value of the method object.
Syntax
%number = float:Absolute
Syntax terms
%number | A variable to receive the numeric result of the Absolute method. |
---|---|
float | A Float value. |
Usage notes
- The Absolute function is available as of Sirius Mods Version 7.3
Examples
- The following statement places into %y the absolute value of the number in %x:
%y = %x:absolute
- The following statement returns 6.4 to %y:
%y = -6.4:absolute