Difference between revisions of "ApCoCoA-1:Fn.Round"

From ApCoCoAWiki
m (Bot: Category moved)
m (fixed links to namespace ApCoCoA)
Line 21: Line 21:
 
</example>
 
</example>
 
</description>
 
</description>
<see>Fn.RoundN</see>
+
<see>ApCoCoA-1:Fn.RoundN|Fn.RoundN</see>
<see>Fn.SetAccuracy</see>
+
<see>ApCoCoA-1:Fn.SetAccuracy|Fn.SetAccuracy</see>
<see>Fn.GetAccuracy</see>
+
<see>ApCoCoA-1:Fn.GetAccuracy|Fn.GetAccuracy</see>
 
<key>Fn.Round</key>
 
<key>Fn.Round</key>
 
<key>elemfns.Round</key>
 
<key>elemfns.Round</key>

Revision as of 08:16, 7 October 2020

Fn.Round

Round a number.

Syntax

Fn.Round(X:RAT):RAT

Description

This function rounds the given value X to the current global accuracy.

  • @param X The value to round.

  • @return Returns X rounded to the accuracy Acc.

Example

Fn.SetAccuracy(3);
R := Fn.RoundN(3.14159);
Dec(R, 10);

3.142
-------------------------------

Fn.RoundN

Fn.SetAccuracy

Fn.GetAccuracy