Author: Antton Tapani (Uploaded by Haamu) Size: 48.9 KB Date Added: 12-21-2008 Downloads: 0 Average Rating: Not Rated Publisher's Description Basic math compound to calculate shortest possible segment between 2 arbitrary lines. The 2 lines are represented by point in space and direction vector (can be arbitrary length) Outputs: closest point1: point on line 1, closest to line 2 closest point2: point on line 2, closest to line 1 vector between: vector from between the resulting points closest distance: distance between the resulting points offset from point1: distance between original point 1 and result point 1. Can be negative offset from point2: distance between original point 2 and result point 2. Can be negative Note that the implementation is quite quick and dirty. I suspect it may fail in some special cases. Post errors below.