summaryrefslogtreecommitdiff
path: root/lowlevelunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-12-17 09:54:02 +0100
committerErich Eckner <git@eckner.net>2018-12-17 09:54:14 +0100
commitb004e66257cfa16f17f5c2dffd0ece816ad57b8a (patch)
tree8d7b8682f91b4e9dad5952a73bf2c89c11d98ad5 /lowlevelunit.pas
parent1488457846432bdd59bad7a528958d4876a896af (diff)
downloadunits-b004e66257cfa16f17f5c2dffd0ece816ad57b8a.tar.xz
lowlevelunit.pas: genToStr() neu
Diffstat (limited to 'lowlevelunit.pas')
-rw-r--r--lowlevelunit.pas15
1 files changed, 15 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index d26775e..bf974f3 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -110,6 +110,7 @@ function binOpPos(op: char; s: string): integer;
function fktPos(fkt,s: string): integer;
procedure gibAus(s: string; ausgaben: byte);
function strToGen(out gen: tGenauigkeit; s: string): boolean;
+function genToStr(gen: tGenauigkeit): string;
function mischeFarben(a,b: tRGB; x: extended): tRGB; inline;
function orFarben(a,b: tRGB): tRGB; inline;
function andFarben(a,b: tRGB): tRGB; inline;
@@ -741,6 +742,20 @@ begin
result:=false;
end;
+function genToStr(gen: tGenauigkeit): string;
+begin
+ case gen of
+ gSingle:
+ result:='single';
+ gDouble:
+ result:='double';
+ gExtended:
+ result:='extended';
+ else
+ result:='NONE';
+ end{of case};
+end;
+
function mischeFarben(a,b: tRGB; x: extended): tRGB;
begin
result.rgbRed:=min(255,max(0,round(a.rgbRed*(1-x)+b.rgbRed*x)));