squareroot: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Redirecting to Macros:Functions:sqrt)
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[Macros:Functions:sqrt]]
{{MacroFunction
|name=squareroot
|description=
Returns the [[wp:Square_root|square root]] of a number.
 
|usage=
<syntaxhighlight lang="mtmacro" line>
[h: num = squareroot(number)]
[h: num = sqrt(number, precision)]
</syntaxhighlight>
'''Parameters'''
{{param|number|Value to determine the square root of.}}
{{param|precision|Number of decimal points. Defaults to 10.}}
 
|example=
<syntaxhighlight lang="mtmacro" line>
[r: squareroot(9)]
[r: squareroot(80)]
[r: sqrt(10,2)]
</syntaxhighlight>
'''Returns'''
<syntaxhighlight lang="mtmacro">
  3 
  8.9442719100 
  3.16 
</syntaxhighlight>
 
}}
[[Category:Mathematical Function]]

Latest revision as of 17:42, 14 March 2023

squareroot() Function

Returns the square root of a number.

Usage

[h: num = squareroot(number)]
[h: num = sqrt(number, precision)]

Parameters

  • number - Value to determine the square root of.
  • precision - Number of decimal points. Defaults to 10.

Example

[r: squareroot(9)]
[r: squareroot(80)]
[r: sqrt(10,2)]

Returns

  3  
  8.9442719100  
  3.16