Round

Rounds a numeric value to specified precision (number of digits after the decimal point).

inputs:

value  – input numeric value to round, e.g. result of math operation or value from Sugar Fields with Get Attribute Data operator. To avoid ambiguity in numeric values which may vary based on user preferences please use output port value from Get Attribute operator to perform any math operation using Sugar fields values.

  • Required: yes

precision – specify directly in the operator number of decimals to round to:

  • If the precision is positive, a value is rounded to defined in precision significant digits after the decimal point.
  • If the precision is negative, a value is rounded to defined in precision significant digits before the decimal point (e.g. for a precision of -1 value is rounded to tens, for a precision of -2 to hundreds, etc.)
    • Required: yes

round type – select from the list the mode in which rounding occurs:

  • Round Half Up Rounds a value away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.
  • Round Half Down Rounds a value towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.
  • Round Half Even Rounds a value towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.
  • Round Half Odd Rounds a value towards the nearest odd value when it is half way there, making 1.5 into 1 and 2.5 into 3.
  • Round Up Rounds a value away from zero, making 1.5 into 2
  • Round Down Rounds a value towards zero, making 1.5 into 1
    • Required: yes

outputs:

result – the value rounded to the given precision with the selected round type. Result may be used as an input for Math or Set Entity Attributes operator. 

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *