if (t>0), it is ray
if t has a range, it is segment
distance between one straight line and one point

Distance between two lines
Lesson Explainer: The Perpendicular Distance between Points and Straight Lines in Space | Nagwa
In this explainer, we will learn how to calculate the perpendicular distance between a point and a straight line or between two parallel lines in space using a formula.
https://www.nagwa.com/en/explainers/939127418581/

Shortest Distance Between Two Lines in 3D
This is an educational video discussing how to calculate the shortest distance between two lines in 3D space. It was made using Adobe Premiere Pro CC, Autodesk Maya and Adobe Photoshop CC. All content belongs to Anvi Dalal.
https://www.youtube.com/watch?v=6vpXM1dskmY


Seonglae Cho