skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Round
 

Try Corticon Now

Round

SYNTAX

<Decimal>.round(<Integer>)

DESCRIPTION

Rounds <Decimal> to the number of decimal places specified by <Integer>. Standard rounding conventions apply, meaning numbers ending with significant digits of 5 or more round up and numbers ending with significant digits less than 5 round down. <Integer> is optional – if no parameter is specified, then <Decimal> rounds to the nearest whole number of type Decimal.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

The following Rulesheet uses .round to round the value of decimal2 to the 2nd decimal place, and assigns it to decimal1.

SAMPLE TEST

A sample Ruletest provides results for five examples of decimal2.