diff options
author | Erich Eckner <git@eckner.net> | 2015-07-22 10:24:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2015-07-22 10:24:53 +0200 |
commit | f37ed6b4a5487f57ddefd04b8ea830d647fa783c (patch) | |
tree | 117510d1ddb9def830bf1e4ee9e871ee4c01fd09 | |
parent | f4e1f1992b8ac7e5e9fb57be0774114226a12adb (diff) | |
download | units-f37ed6b4a5487f57ddefd04b8ea830d647fa783c.tar.xz |
copyArray eingefuegt
-rw-r--r-- | matheunit.pas | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/matheunit.pas b/matheunit.pas index 93d99d5..4783196 100644 --- a/matheunit.pas +++ b/matheunit.pas @@ -28,6 +28,9 @@ function cmpStr(s1,s2: string): longint; function mitte(s1,s2: string): string; function myFloatToStr(x: extended): string; function myStrToFloat(s: string): extended; +procedure copyArray(i: tExtPointArray; out o: tExtPointArray); overload; +procedure copyArray(i: tLongintArray; out o: tLongintArray); overload; +procedure copyArray(i: tExtendedArray; out o: tExtendedArray); overload; implementation @@ -218,5 +221,34 @@ begin result:=-result; end; +procedure copyArray(i: tExtPointArray; out o: tExtPointArray); +var + j: longint; +begin + setlength(o,length(i)); + for j:=0 to length(o)-1 do begin + o[j].x:=i[j].x; + o[j].y:=i[j].y; + end; +end; + +procedure copyArray(i: tLongintArray; out o: tLongintArray); +var + j: longint; +begin + setlength(o,length(i)); + for j:=0 to length(o)-1 do + o[j]:=i[j]; +end; + +procedure copyArray(i: tExtendedArray; out o: tExtendedArray); +var + j: longint; +begin + setlength(o,length(i)); + for j:=0 to length(o)-1 do + o[j]:=i[j]; +end; + end. |