Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleAvailability

This routine is available starting with katl-commons 2.5.


Syntax

round(number, digits)


Description

Excerpt

Rounds a number to a specified number of digits.

 


Parameters

ParameterTypeRequiredDescription
numberNumberYesThe number that Number you want to round.
digitsNumberYesThe number Number of digits you want to round the number argument to.

Return type

number

Example

Code Block
number a = round(2.36547, 2);
print("a= " + a);

Prints: a= 2.37;

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "math_routines"
labelsmath_routines