Difference between revisions of "ApCoCoA-1:Fn.RoundN"
From ApCoCoAWiki
S schuster (talk | contribs) (New page: <command> <title>Fn.RoundN</title> <short_description>Round a number to a desired accuracy.</short_description> <syntax> Fn.RoundN(X:RAT,Acc:INT):RAT </syntax> <description> This funct...) |
|||
Line 25: | Line 25: | ||
<see> Fn.GetAccuracy</see> | <see> Fn.GetAccuracy</see> | ||
<key>Fn.RoundN</key> | <key>Fn.RoundN</key> | ||
− | <key> | + | <key>elemfns.RoundN</key> |
<key>RoundN</key> | <key>RoundN</key> | ||
<wiki-category>Package_elemfns</wiki-category> | <wiki-category>Package_elemfns</wiki-category> | ||
</command> | </command> |
Revision as of 14:21, 4 May 2011
Fn.RoundN
Round a number to a desired accuracy.
Syntax
Fn.RoundN(X:RAT,Acc:INT):RAT
Description
This function rounds the given value X to the given accuracy Acc.
@param X The value to round.
@param Acc The desired accuracy.
@return Returns X rounded to the accuracy Acc.
Example
R := Fn.RoundN(3.14159, 3); Dec(R, 10); 3.142 -------------------------------