public static void distanceFromSurroundingPointsToVector(Computation comp, List<Measurement> measurements, int threshold) {
		double sum1 = 0.0;
		int count1 = 0;
		double sum2 = 0.0;
		int count2 = 0;

		HashSet<Integer> indices = Generate.randomInts(threshold, measurements.size(), null);

		for(int i :  indices) {
			Measurement curr = measurements.get(i);

			double dist1 = comp.getLongestVector().getP1().distance(curr.getCoordinates());
			double dist2 = comp.getLongestVector().getP2().distance(curr.getCoordinates());
			if(dist1 <= dist2) {
				sum1 += comp.getLongestVector().ptLineDist(curr.getCoordinates());
				count1++;
			}
			else {
				sum2 += comp.getLongestVector().ptLineDist(curr.getCoordinates());
				count2++;
			}

		}

		double average1 = sum1/count1;
		double average2 = sum2/count2;

		if(average1 <= average2) {
			double dist1 = comp.getLongestVector().getP1().distance(comp.getHeuristicCell1().getCellTowerCoordinates());
			double dist2 = comp.getLongestVector().getP1().distance(comp.getHeuristicCell2().getCellTowerCoordinates());
			if(dist2 < dist1) {
				DefaultCell temp = comp.getHeuristicCell1();
				comp.setHeuristicCell1(comp.getHeuristicCell2());
				comp.setHeuristicCell2(temp);
			}
		}
		else {
			double dist1 = comp.getLongestVector().getP2().distance(comp.getHeuristicCell1().getCellTowerCoordinates());
			double dist2 = comp.getLongestVector().getP2().distance(comp.getHeuristicCell2().getCellTowerCoordinates());
			if(dist2 < dist1) {
				DefaultCell temp = comp.getHeuristicCell1();
				comp.setHeuristicCell1(comp.getHeuristicCell2());
				comp.setHeuristicCell2(temp);
			}
		}
	}