Debian Codegraph @

gcc/testsuite/gnat.dg/aspect1_vectors_2d.ads

raw
1 generic
2 type T_horizontal is new float;
3
4 -- Declaration of types, constants, and common functions on 3D vectors.
5 -- Corresponds to PVS theory vectors/vectors_2D
6 package Aspect1_Vectors_2D is
7
8 -- A 2D vector, represented by an x and a y coordinate.
9 type Vect2 is record
10 x: T_horizontal;
11 y: T_horizontal;
12 end record;
13
14 subtype Nz_vect2 is Vect2
15 with Predicate => (Nz_vect2.x /= 0.0 and then Nz_Vect2.y /= 0.0);
16 end Aspect1_Vectors_2D;