/* Auteur: Nicolas JANEY */ /* nicolas.janey@univ-fcomte.fr */ /* Novembre 2006 */ public class CohenSutherland { public static void main(String [] args) { Segment s = new Segment(new Position(1.0F,2.0F), new Position(8.0F,6.0F)); Rectangle r = new Rectangle(new Position(2.0F,3.0F), new Position(6.0F,5.0F)); Segment sc = r.clip(s); if ( sc != null ) System.out.println(sc); } }