code: boolean ensureCCW( SquareGrid grid ) {
  		if( grid.columns <= 2 && grid.rows <= 2 )
  			return true;
  
  		Point2D_F64 a,b,c;
  
  		a = grid.get(0,0).center;
  		if( grid.columns > 2)
  			b = grid.get(0,2).center;
  		else
  			b = grid.get(1,1).center;
  
  		if( grid.rows > 2)
  			c = grid.get(2,0).center;
  		else
  			c = grid.get(1,1).center;
  
  		double x0 = b.x-a.x;
  		double y0 = b.y-a.y;
  
  		double x1 = c.x-a.x;
  		double y1 = c.y-a.y;
  
  		double z = x0 * y1 - y0 * x1;
  		if( z < 0 ) {
  			// flip it along an axis which is symmetric
  			if( grid.columns%2 == 1 )
  				tools.flipColumns(grid);
  			else if( grid.rows%2 == 1 )
  				tools.flipRows(grid);
  			else
  				return false;
  		}
  		return true;
  	}
docs: Ensures that the grid is in a CCW order.  It is assumed that (0,0) is a square.
  
  @return true if it was able to make it CCW or false if it failed to