Figure 3.
SLIGHTLY_BETTER_COORDINATES package specification.
------------------------------------------------------------
-- This package is better because it will always use
-- integers with 32-bit range, regardless of the computer.
with STANDARD_INTEGERS; use STANDARD_INTEGERS;
package SLIGHTLY_BETTER_COORDINATES is
type Rectangular_points is
record
NORTH : Integer_32; -- feet;
EAST : Integer_32; -- feet;
end record;
type Polar_points is
record
R : Integer_32; -- feet;
THETA : float; -- degrees;
end record;
function Transform(RP : Rectangular_points)
return Polar_points;
function Transform(PP : Polar_points)
return Rectangular_points;
end SLIGHTLY_BETTER_COORDINATES;