1. -- 
  2. -- Jan & Uwe R. Zimmer, Australia, September 2019 
  3. -- 
  4.  
  5. generic 
  6.  
  7.    type Real is digits <>; 
  8.    type Coordinates is (<>); 
  9.  
  10. package Vectors_xD is 
  11.  
  12.    pragma Elaborate_Body; 
  13.  
  14.    type Vector_xD is array (Coordinates) of Real; 
  15.  
  16.    Zero_Vector_xD : constant Vector_xD := (others => 0.0); 
  17.  
  18.    function Image (V : Vector_xD) return String; 
  19.  
  20.    function Norm (V : Vector_xD) return Vector_xD; 
  21.  
  22.    function "*" (Scalar : Real; V : Vector_xD) return Vector_xD; 
  23.    function "*" (V : Vector_xD; Scalar : Real) return Vector_xD; 
  24.    function "/" (V : Vector_xD; Scalar : Real) return Vector_xD; 
  25.  
  26.    function "*" (V_Left, V_Right : Vector_xD) return Real; 
  27.  
  28.    function Angle_Between (V_Left, V_Right : Vector_xD) return Real; 
  29.  
  30.    function "+" (V_Left, V_Right : Vector_xD) return Vector_xD; 
  31.    function "-" (V_Left, V_Right : Vector_xD) return Vector_xD; 
  32.    function "-" (V : Vector_xD)               return Vector_xD; 
  33.  
  34.    function "abs" (V : Vector_xD) return Real; 
  35.  
  36. end Vectors_xD;