From 7f75a6ee2c2aab633a76bdb1e3183eaa80c3c48b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 10 Mar 2016 09:54:25 +0100 Subject: round,floor,ceil neu in exprToFloat ind matheunit.pas --- matheunit.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matheunit.pas b/matheunit.pas index 7b00e52..c913ae5 100644 --- a/matheunit.pas +++ b/matheunit.pas @@ -394,7 +394,7 @@ var i,j,k,l,m: longint; inv,neg,cbv: boolean; val1,val2: extended; const - fkt1: array[0..6] of string = ('exp','sin','cos','tan','sqr','sqrt','ln'); + fkt1: array[0..9] of string = ('exp','sin','cos','tan','sqr','sqrt','ln','round','floor','ceil'); fkt2: array[0..1] of string = ('min','max'); begin s:=trimAll(s); @@ -423,6 +423,9 @@ begin 4: val1:=sqr(val1); 5: val1:=sqrt(val1); 6: val1:=ln(val1); + 7: val1:=round(val1); + 8: val1:=floor(val1); + 9: val1:=ceil(val1); end{of case}; s:=copy(s,1,k-1) + floattostr(val1) + copy(s,j+1,length(s)); end; -- cgit v1.2.3-70-g09d2