Commit | Line | Data |
---|---|---|
88b9d363 | 1 | -- Copyright 2021-2022 Free Software Foundation, Inc. |
c04da66c TT |
2 | -- |
3 | -- This program is free software; you can redistribute it and/or modify | |
4 | -- it under the terms of the GNU General Public License as published by | |
5 | -- the Free Software Foundation; either version 3 of the License, or | |
6 | -- (at your option) any later version. | |
7 | -- | |
8 | -- This program is distributed in the hope that it will be useful, | |
9 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | -- GNU General Public License for more details. | |
12 | -- | |
13 | -- You should have received a copy of the GNU General Public License | |
14 | -- along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | package Twovecs is | |
17 | type My_Integer is mod 2**16 ; | |
18 | ||
19 | type Twovec is private; | |
20 | ||
21 | function Pt (X, Y : My_Integer) return Twovec; | |
22 | ||
23 | function "+" (P0, P1 : Twovec) return Twovec; | |
24 | function "-" (P0, P1 : Twovec) return Twovec; | |
25 | function "*" (P0, P1 : Twovec) return Twovec; | |
26 | function "/" (P0, P1 : Twovec) return Twovec; | |
27 | function "mod" (P0, P1 : Twovec) return Twovec; | |
28 | function "rem" (P0, P1 : Twovec) return Twovec; | |
29 | function "**" (P0, P1 : Twovec) return Twovec; | |
30 | ||
31 | function "<" (P0, P1 : Twovec) return Boolean; | |
32 | function "<=" (P0, P1 : Twovec) return Boolean; | |
33 | function ">" (P0, P1 : Twovec) return Boolean; | |
34 | function ">=" (P0, P1 : Twovec) return Boolean; | |
35 | function "=" (P0, P1 : Twovec) return Boolean; | |
36 | ||
37 | function "and" (P0, P1 : Twovec) return Twovec; | |
38 | function "or" (P0, P1 : Twovec) return Twovec; | |
39 | function "xor" (P0, P1 : Twovec) return Twovec; | |
40 | function "&" (P0, P1 : Twovec) return Twovec; | |
41 | ||
42 | function "abs" (P0 : Twovec) return Twovec; | |
43 | function "not" (P0 : Twovec) return Twovec; | |
44 | function "+" (P0 : Twovec) return Twovec; | |
45 | function "-" (P0 : Twovec) return Twovec; | |
46 | ||
47 | procedure Do_Nothing (P : Twovec); | |
48 | ||
49 | private | |
50 | ||
51 | type Twovec is record | |
52 | X, Y : My_Integer; | |
53 | end record; | |
54 | ||
55 | end Twovecs; |