Hosted by
|
generic
type Number is private;
Zero : Number;
with function To_String
(This : in Number)
return String
is <>;
with function To_String
(This : in Number;
Tolerance : in Number)
return String
is <>;
with function Sqrt
(This : in Number)
return Number
is <>;
with function Min
(A, B : in Number)
return Number
is <>;
with function Max
(A, B : in Number)
return Number
is <>;
with function "+"(A : in Number) return Number is <>;
with function "-"(A : in Number) return Number is <>;
with function "+"(A, B : in Number) return Number is <>;
with function "-"(A, B : in Number) return Number is <>;
with function "*"(A, B : in Number) return Number is <>;
with function "/"(A, B : in Number) return Number is <>;
with function ">"(A, B : in Number) return Boolean is <>;
with function "<"(A, B : in Number) return Boolean is <>;
with function ">="(A, B : in Number) return Boolean is <>;
with function "<="(A, B : in Number) return Boolean is <>;
with function "="(A, B : in Number) return Boolean is <>;
package Vectors is
type Vector is record
X, Y : Number;
end record;
function "+"(A : in Vector) return Vector;
function "-"(A : in Vector) return Vector;
function "+"(A, B : in Vector) return Vector;
function "-"(A, B : in Vector) return Vector;
function "*"(A, B : in Vector) return Vector;
function "*"(A : in Vector; B : in Number) return Vector;
function "*"(A : in Number; B : in Vector) return Vector;
function "/"(A : in Vector; B : in Number) return Vector;
function "abs"(A : in Vector) return Number;
function Mirror_Y(A : in Vector) return Vector;
function To_String
(A : in Vector)
return String;
function To_String
(A : in Vector;
Tolerance : in Number)
return String;
type Rectangle is record
Left : Number;
Top : Number;
Right : Number;
Bottom : Number;
end record;
function Max
(A, B : in Rectangle)
return Rectangle;
function "+"
(A : in Rectangle;
B : in Vector)
return Rectangle;
function Get_Width
(This : in Rectangle)
return Number;
function Get_Height
(This : in Rectangle)
return Number;
function Get_Bottom_Left
(This : in Rectangle)
return Vector;
function Get_Top_Right
(This : in Rectangle)
return Vector;
function Get_Bottom_Right
(This : in Rectangle)
return Vector;
function Get_Top_Left
(This : in Rectangle)
return Vector;
function To_String
(This : in Rectangle)
return String;
function To_String
(This : in Rectangle;
Tolerance : in Number)
return String;
end Vectors;
|