aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/opt18.ads
blob: 85c3b634527db630cbb4cdf44a8684e13d6e53fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package Opt18 is

   type Cart_Axis_Type is (X, Y, Z);

   type Cart_Vector_Type is array (Cart_Axis_Type) of Float;

   function Mag (Item : in Cart_Vector_Type) return Float;

   type Unit_Vector_Type is array (Cart_Axis_Type) of Float;

   type Mag_Axis_Type is
   record
      Mag  : Float;
      Axis : Unit_Vector_Type;
   end record;

   type Unit_Quaternion_Type is record
      X : Float;
      Y : Float;
      Z : Float;
      S : Float;
   end record;

   function Unit_Quaternion_To_Mag_Axis (Quaternion : in Unit_Quaternion_Type)
     return Mag_Axis_Type;

   X_Unit : constant Unit_Vector_Type := (1.0, 0.0, 0.0);

end Opt18;