-- $Date: 2004/01/03 03:39:48 $
-- $Revision: 1.3 $
-- $Author: jcrocholl $

with Real_Strings; use Real_Strings;

package body Intersections is

   -- Format an intersection as a string. For debugging heaps of
   -- intersections.
   function To_String
     (Item : in Intersection-- Format this intersection.
     return String is         -- The debugging info.
   begin
      if Item.White_To_Black
      then return To_String(Item.X) & "WB";
      else return To_String(Item.X) & "BW";
      end if;
   end To_String;

   -- Compare two intersections by their X value.
   function "<"
     (A, B : in Intersection-- Compare these intersections.
     return Boolean is        -- True if and only if A is left of B.
   begin
      return A.X < B.X;
   end "<";

end Intersections;