RoundUp (FPScript)
Rounds up to a number of decimal places that you can specify.
Syntax
RoundUp(Number, Places)
The syntax of the RoundUp function consists of the following parts:
Part |
Description |
---|---|
Number |
The real or complex number that is rounded up. All data structures are allowed. All numeric data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
Places |
Specifies the number of decimal places to which to round up. Permitted data structures are scalar value. All numeric data types are permitted. The value must be greater or equal to 1. For complex data types the absolute value is formed. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
Remarks
The result has the same structure and unit as the argument Number.
For signals, only the Y component is considered. For complex numbers, real and imaginary parts are rounded up separately.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
RoundUp(1.2345, 2) |
Results in 1.300. |
RoundUp(1.253 °C, 2) |
Results in 1.300 °C. |
RoundUp(12745, 2) |
Results in 13000. |
RoundUp(-1.234, 2) |
Results in -1.200. |