pcRound
pcRound(n_num[f_precision] [x_tolerance] ) =>x_result
Description
Lets you round a number to the closest integer, using the value of the decimal place specified by x_tolerance; additional decimal places are ignored. If the value of the specified decimal place is less than 5, the system drops all decimal places; if the value of the specified decimal place is greater than or equal to 5, the system drops all decimal places and adds one to the integer.
Arguments
Value Returned
|
An integer. If n_num does not contain a number, an error occurs; look in the CIW or at the |
Examples
The examples below show numbers rounded using pcRound.
pcRound( 1.49 ) results in 1
pcRound( -1.49) results in -1
pcRound( 1.59 ) results in 2
pcRound( -1.59 ) results in -2
pcRound( 5.4993 0.001 1 ) results in 6
pcRound( 5.4993 0.001 2 ) results in 5
pcRound( 5.4993 0.002 1 ) results in 6
pcRound( 5.4993 0.0002 1 ) results in 5
Related Topics
pcFix
pcExprToString
pcTechFile
Recommended, Supported SKILL Functions for Pcells
Return to top