( |
|
|
|||
returns a number rounded to a certain number of decimal places |
Parameters: | |
value | |
round mode | |
global function val RoundVAL(val v,LongInt roundto,Integer typ) begin val res; LongInt lroundto; roundmode rnddef; lroundto = roundto; rnddef = DefaultValRoundoff; if (lroundto<0) then begin lroundto = rnddef.decimals; end; switch (typ) begin otherwise res = Round(v,SetRoundModeD(lroundto)); end; RoundVAL = res; return; end;
Related topics: |