@@ -31,8 +31,8 @@ public static void testIntersections() {
3131 assert linesCompare (new LineSegement (new Point (0 ,0 ), new Point (2 ,3 )),new LineSegement (new Point (0 ,3 ),new Point (9 ,1 ))) == -1 ;
3232 System .out .println ("All Tests OK!" );
3333 }
34-
35- public static boolean sweepCheck (LineSegement s ,Point [][] input ) {
34+
35+ public static boolean sweepCheck (LineSegement s ,Point [][] input ) {
3636 for (int i = 0 ; i < input .length ; i ++) {
3737 System .out .println ("Checking line " +i );
3838 if (input [i ][0 ] == null && input [i ][1 ] == null ) {
@@ -68,8 +68,8 @@ public static boolean sweepCheck(LineSegement s,Point[][] input) {
6868 System .out .println ("No Intersection!" );
6969 }
7070 }
71-
72- }
71+
72+ }
7373 return false ;
7474 }
7575 public static void main (String [] args ) throws IOException {
@@ -99,8 +99,8 @@ public static void main(String[] args) throws IOException{
9999 if (status ) {
100100 break ;
101101 }
102-
103- input [i ][0 ] = a ;
102+
103+ input [i ][0 ] = a ;
104104 input [i ][1 ] = b ;
105105 /*for(int j = 0; j < i; j ++) {
106106 if(Point.intersection(input[j][0], input[j][1], input[i][0], input[i][1])) {
@@ -116,10 +116,10 @@ public static void main(String[] args) throws IOException{
116116 pw .println (output +1 );
117117 pw .close ();
118118 System .exit (0 );
119-
120- }
121119
122- }
120+ }
121+
122+ }
123123class Point {
124124 double x ,y ;
125125 public Point (double x ,double y ) {
@@ -156,7 +156,7 @@ public String toString() {
156156 }
157157}
158158
159- class LineSegement {
159+ class LineSegement {
160160 Point a ,b ;
161161 public LineSegement (Point a ,Point b ) {
162162 if (a .x > b .x ) {
@@ -180,4 +180,4 @@ public Point atX_(double x) {
180180 public String toString () {
181181 return this .a .toString () + " -- " +this .b .toString ();
182182 }
183- }
183+ }
0 commit comments