summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lowlevelunit.pas33
1 files changed, 33 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index 7c7ade1..4712908 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -31,6 +31,9 @@ type
t2x2Longint = array['x'..'y','x'..'y'] of longint;
t2x2Extended = array['x'..'y','x'..'y'] of extended;
t2x2Int64 = array['x'..'y','x'..'y'] of int64;
+ tGerade = record
+ a,r: tExtPoint;
+ end;
tExtPointArray = specialize tArray<tExtPoint>;
tExt3dPointArray = specialize tArray<tExt3dPoint>;
pTExtPointArray = ^tExtPointArray;
@@ -45,6 +48,7 @@ type
tBooleanArray = specialize tArray<boolean>;
tIntPointArrayArray = specialize tArray<tIntPointArray>;
pTIntPointArrayArray = ^tIntPointArrayArray;
+ tGeradenArray = specialize tArray<tGerade>;
tRGB = record
rgbBlue : byte;
rgbGreen: byte;
@@ -135,6 +139,9 @@ function extPoint(x: tInt64Point): tExtPoint; overload;
function _2x2Longint(xx,xy,yx,yy: longint): t2x2Longint;
function _2x2Extended(xx,xy,yx,yy: extended): t2x2Extended;
function ext3dPoint(x,y,z: extended): tExt3dPoint;
+function gerade(a,r: tExtPoint): tGerade;
+function dumpGerade(g: tGerade): string;
+function dumpGeradenArray(ga: tGeradenArray): string;
function hexDump(p: pointer; cnt: longint): string;
function base64ToBin(var s: string): boolean;
@@ -1005,6 +1012,32 @@ begin
result['z']:=z;
end;
+function gerade(a,r: tExtPoint): tGerade;
+begin
+ result.a:=a;
+ result.r:=r;
+end;
+
+function dumpGerade(g: tGerade): string;
+begin
+ result:=
+ 'a: (' + tExtPointToStr(g.a) + ') ' +
+ 'r: (' + tExtPointToStr(g.r) + ')';
+end;
+
+function dumpGeradenArray(ga: tGeradenArray): string;
+var
+ i: longestOrdinal;
+begin
+ result:='{';
+ for i:=0 to length(ga)-1 do begin
+ if i>0 then
+ result:=result+', ';
+ result:=result+dumpGerade(ga[i]);
+ end;
+ result:=result+'}';
+end;
+
function hexDump(p: pointer; cnt: longint): string;
var
i: longint;