Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int a = 0; a <points.length;a++){
- for(int b = a+1; b <points.length;b++){
- for(int c = b+1;c <points.length;c++){
- for(int d = c+1; d<points.length;d++){
- Double slopeAC = points[a].slopeTo(points[c]);
- double slopeAB = points[a].slopeTo(points[b]);
- double slopeAD= points[a].slopeTo(points[d]);
- Point[] temp = new Point[4];
- temp[0] = points[a];
- temp[1] = points[b];
- temp[2] = points[c];
- temp[3] = points[d];
- if(slopeAB == slopeAC &&slopeAB == slopeAD){
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement