Availability
This routine is available starting with katl-commons 2.5.
Syntax
round(number, digits)
Description
Rounds a number to a specified number of digits.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
number | Number | Yes | Number you want to round. |
digits | Number | Yes | Number of digits you want to round the number argument to. |
Return type
number
Example
number a = round(2.36547, 2); print("a= " + a);
Prints: a= 2.37;
See also