Difference between revisions of "ApCoCoA:Fn.Round"

From CoCoAWiki
(New page: <command> <title>Fn.Round</title> <short_description>Round a number.</short_description> <syntax> Fn.Round(X:RAT):RAT </syntax> <description> This function rounds the given value <tt>X...)
(No difference)

Revision as of 15:52, 4 May 2011

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

ApCoCoA: Fn.RoundN

ApCoCoA: Fn.SetAccuracy

ApCoCoA: Fn.GetAccuracy