summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-07-03 11:29:26 +0200
committerErich Eckner <git@eckner.net>2020-07-03 11:29:26 +0200
commit3a972b83a2444ed756a1c0901418ec6de2616bb8 (patch)
tree83d0857da6e719e018db1792713809cbd3dc4a5a
parent99f11e2b8f4b126579cf81c63efc24c9eb7e1444 (diff)
downloadunits-3a972b83a2444ed756a1c0901418ec6de2616bb8.tar.xz
lowlevelunit.pas: Skalarprodukte neu
-rw-r--r--lowlevelunit.pas20
1 files changed, 20 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index 5c2db13..3477bf8 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -84,6 +84,8 @@ operator * (a: longint; x: tIntPoint): tIntPoint; inline;
operator * (a: extended; x: tIntPoint): tExtPoint; inline;
operator * (a: extended; x: tExtPoint): tExtPoint; inline;
operator * (a: extended; x: tExt3dPoint): tExt3dPoint; inline;
+operator * (x1,x2: tIntPoint): int64; inline;
+operator * (x1,x2: tInt64Point): int64; inline;
operator * (x1,x2: tExtPoint): extended; inline;
operator * (x1,x2: tExt3dPoint): extended; inline;
@@ -366,6 +368,24 @@ begin
result[c]:=a*x[c];
end;
+operator * (x1,x2: tIntPoint): int64;
+var
+ c: char;
+begin
+ result:=0;
+ for c:='x' to 'y' do
+ result:=result + x1[c]*x2[c];
+end;
+
+operator * (x1,x2: tInt64Point): int64;
+var
+ c: char;
+begin
+ result:=0;
+ for c:='x' to 'y' do
+ result:=result + x1[c]*x2[c];
+end;
+
operator * (a: extended; x: tExtPoint): tExtPoint;
var
c: char;