Distance Between Two Lines
For two intersecting lines:
$$d=0$$
For parallel lines:
$$d=\frac{|(\vec b-\vec a)\times\vec d|}{|\vec d|}$$
For skew lines:
$$d=\frac{|(\vec c-\vec a)\cdot(\vec b\times\vec d)|}{|\vec b\times\vec d|}$$
Usage
- Used to select the appropriate shortest-distance formula based on the relative positions of the lines.