public static double cos(Vector3D a, Vector3D b) {
		double product = Vector3D.DotProduct(a, b);
		double lengthA = a.Length();
		double lengthB = b.Length();
		if (lengthA == 0 || lengthB == 0) {
			return -9999;
		} else {
			return product / lengthA / lengthB;
		}
	}