diff options
author | Erich Eckner <git@eckner.net> | 2023-07-10 21:09:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-07-10 21:09:12 +0200 |
commit | 1575af3fed5f6e312c9e4c84cffc74eb50d4ed36 (patch) | |
tree | 571ef018deeea71524178158154e95acea55ecf0 | |
parent | c28a90f1385d9dee0d42e19f45971b7ca3792999 (diff) | |
download | units-1575af3fed5f6e312c9e4c84cffc74eb50d4ed36.tar.xz |
lowlevelunit.pas: point() converter
-rw-r--r-- | lowlevelunit.pas | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas index 37a6267..2fb1710 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -142,6 +142,8 @@ function tIntPointToStr(p: tIntPoint): string; function strToTIntPoint(s: string): tIntPoint; function tInt64PointToStr(p: tInt64Point): string; procedure fehler(s: string); +function point(x: tIntPoint): tPoint; overload; +function point(x: tInt64Point): tPoint; overload; function intPoint(x,y: longint): tIntPoint; function int64Point(x,y: int64): tInt64Point; function extPoint(x,y: extended): tExtPoint; overload; @@ -1048,6 +1050,18 @@ begin raise exception.create(s); end; +function point(x: tIntPoint): tPoint; +begin + result.x:=x['x']; + result.y:=x['y']; +end; + +function point(x: tInt64Point): tPoint; +begin + result.x:=x['x']; + result.y:=x['y']; +end; + function intPoint(x,y: longint): tIntPoint; begin result['x']:=x; |