Bendrinti naudojant


decRound Function

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Rounds a number to the specified number of decimal places.

real decRound(real figure, int decimals)

Parameters

Parameter

Description

figure

The number to round.

decimals

The number of decimal places to round to.

Return Value

The value of the specified number, rounded to the specified number of decimal places.

Remarks

The value of the decimals parameter can be positive, zero, or negative.

  • decRound(1234.6574,2); //Returns the value 1234.66.

  • decRound(1234.6574,0); //Returns the value 1235.

  • decRound(1234.6574,-2); //Returns the value 1200.

  • decRound(12345.6789,1) //Returns the value 12345.70.

  • decRound(12345.6789,-1) //Returns the value 12350.00.

See also

round Function

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).