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

From ApCoCoAWiki
m (Bot: Category moved)
m (insert version info)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
 
   <title>Fn.RoundN</title>
 
   <title>Fn.RoundN</title>
Line 21: Line 22:
 
</example>
 
</example>
 
</description>
 
</description>
<see>Fn.Round</see>
+
<see>ApCoCoA-1:Fn.Round|Fn.Round</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.RoundN</key>
 
<key>Fn.RoundN</key>
 
<key>elemfns.RoundN</key>
 
<key>elemfns.RoundN</key>

Latest revision as of 10:05, 7 October 2020

This article is about a function from ApCoCoA-1.

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
-------------------------------

Fn.Round

Fn.SetAccuracy

Fn.GetAccuracy