diff options
author | Erich Eckner <git@eckner.net> | 2018-09-25 09:24:08 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-25 09:28:41 +0200 |
commit | d4b335dd5b48e5488b882b6e72e9652ad219c62f (patch) | |
tree | 7c1f9a544c51c688352fd48ccce1028284cf840a | |
parent | bbe06ed249041958373b0ed9aec3710c357ee2ef (diff) | |
download | units-d4b335dd5b48e5488b882b6e72e9652ad219c62f.tar.xz |
lowlevelunit.pas: tGerade neu
-rw-r--r-- | lowlevelunit.pas | 33 |
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; |