Page 1 of 1

Round, RoundUp, RoundDown

Posted: 15 Jul 2014, 14:26
by PetrS
size=150Extension of functions Round, RoundUp, RoundDown/size
Version: 0.1.2 and higher

Functions Round, RoundUp and RoundDown now accepts up to 3 parameters:
list
*double Value - A double-precision number to be rounded./*:m
*double Decimals - The number of decimal places in the return value./*:m
*string Unit - Physical unit, in which the value is expressed./*:m/list:u

Each physical value (value with physical unit) is internally stored in base SI units.
Calling Round functions with 3. parameter (Unit) allows user to define, in which physical unit is the value expressed for rounding procedure.

See attached example for more details.
Note: Example contains three layouts, with various setting of UnitDrawingStyle. See all three layouts for better understanding how physical values (number with physical unit) are handled.