Used ChatGPT to calculate the closest distance to a line segment. Advantages over googling: 1. Tailored answer to my need. 2. Less time spent on long forums and blog posts. Disadvantages: 1. It looked right to my eyes, but it turned out to be wrong in testing.