with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Text_IO;
package GL.Math is
package REF is new Ada.Numerics.Generic_Elementary_Functions (Double);
package RIO is new Ada.Text_IO.Float_IO (Double);
function "*" (l : Double; v : Double_Vector_3D) return Double_Vector_3D;
pragma Inline ("*");
function "*" (v : Double_Vector_3D; l : Double) return Double_Vector_3D;
pragma Inline ("*");
function "+" (a, b : Double_Vector_3D) return Double_Vector_3D;
pragma Inline ("+");
function "-" (a : Double_Vector_3D) return Double_Vector_3D;
pragma Inline ("-");
function "-" (a, b : Double_Vector_3D) return Double_Vector_3D;
pragma Inline ("-");
function "*" (a, b : Double_Vector_3D) return Double;
pragma Inline ("*");
function "*" (a, b : Double_Vector_3D) return Double_Vector_3D;
pragma Inline ("*");
function Norm (a : Double_Vector_3D) return Double;
pragma Inline (Norm);
function Norm2 (a : Double_Vector_3D) return Double;
pragma Inline (Norm2);
function Normalized (a : Double_Vector_3D) return Double_Vector_3D;
type Vector_4D is array (0 .. 3) of Double;
function Angle (Point_1, Point_2, Point_3 : Double_Vector_3D) return Double;
function to_Degrees (Radians : Double) return Double;
function to_Radians (Degrees : Double) return Double;
type Matrix is array (Positive range <>, Positive range <>) of aliased Double;
type Matrix_33 is new Matrix (1 .. 3, 1 .. 3);
type Matrix_44 is new Matrix (1 .. 4, 1 .. 4);
pragma Convention (Fortran, Matrix_44);
Id_33 : constant Matrix_33 := ((1.0, 0.0, 0.0),
(0.0, 1.0, 0.0),
(0.0, 0.0, 1.0));
function "*" (A, B : Matrix_33) return Matrix_33;
function "*" (A : Matrix_33; x : Double_Vector_3D) return Double_Vector_3D;
function "*" (A : Matrix_44; x : Double_Vector_3D) return Double_Vector_3D;
function "*" (A : Matrix_44; x : Double_Vector_3D) return Vector_4D;
function Transpose (A : Matrix_33) return Matrix_33;
function Transpose (A : Matrix_44) return Matrix_44;
function Det (A : Matrix_33) return Double;
function XYZ_rotation (ax, ay, az : Double) return Matrix_33;
function XYZ_rotation (v : Double_Vector_3D) return Matrix_33;
function Look_at (direction : Double_Vector_3D) return Matrix_33;
function Look_at (eye, center, up : Double_Vector_3D) return Matrix_33;
procedure Re_Orthonormalize (M : in out Matrix_33);
procedure Multiply_GL_Matrix (A : Matrix_33);
procedure Set_GL_Matrix (A : Matrix_33);
function Almost_zero (x : Double) return Boolean;
pragma Inline (Almost_zero);
function Almost_zero (x : GL.C_Float) return Boolean;
pragma Inline (Almost_zero);
function Sub_Matrix (Self : Matrix;
start_Row, end_Row : Positive;
start_Col, end_Col : Positive) return Matrix;
end GL.Math;