static double[] normaliseVector(double[] vector) {

		double xvector = vector[0];
		double yvector = vector[1];
		double zvector = vector[2];

		double extent = Math.sqrt(Math.pow(xvector, 2) + Math.pow(yvector, 2)
				+ Math.pow(zvector, 2));

		double xnormalised = xvector / extent;
		double ynormalised = yvector / extent;
		double znormalised = zvector / extent;

		double[] normalised = new double[] { xnormalised, ynormalised,
				znormalised };

		return normalised;

	}