Nexial Automation

Test Automation Platform for everyone!

X

number » roundTo(var,closestDigit)

Description

This command round the number represented by var to the nearest digits and stores it back to var.

Note that the rounding logic can be affected/customized via the nexial.number.rounding System variable.

Parameters

  • var - the value to be rounded.
  • closestDigit - the nearest digit to be rounded.

Example 

script

Output:
output

See Also