private void orderPath(Path path) {
		if (path.isMarked)
			return;
		path.isMarked = true;
		Segment segment = null;
		Vertex vertex = null;
		for (int v = 0; v < path.grownSegments.size() - 1; v++) {
			segment = (Segment) path.grownSegments.get(v);
			vertex = segment.end;
			double thisAngle = ((Double) vertex.cachedCosines.get(path))
					.doubleValue();
			if (path.isInverted)
				thisAngle = -thisAngle;

			for (int i = 0; i < vertex.paths.size(); i++) {
				Path vPath = (Path) vertex.paths.get(i);
				if (!vPath.isMarked) {
					double otherAngle = ((Double) vertex.cachedCosines
							.get(vPath)).doubleValue();

					if (vPath.isInverted)
						otherAngle = -otherAngle;

					if (otherAngle < thisAngle)
						orderPath(vPath);
				}
			}
		}

		orderedPaths.add(path);
	}