Skip to content

distToSegmentSquared

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/dot/blob/main/js/util/distToSegmentSquared.ts for the most up-to-date information.

Overview

Squared distance from a point to a line segment squared. See http://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment

@param point - The point @param a - Starting point of the line segment @param b - Ending point of the line segment

@author Jonathan Olson <jonathan.olson@colorado.edu> @author Martin Veillette (Berea College)

Source Code

See the source for distToSegmentSquared.ts in the dot repository.