src/util/src/geometry.js
function findSquaredDistanceFromSegmentToPoint(segment, point) {
  findClosestPointOnSegmentToPoint(_segmentDistance_tmpVecA, segment, point);
  return vec3.squaredDistance(_segmentDistance_tmpVecA, point);
}
function findSquaredDistanceFromSegmentToPoint(segment, point) {
  findClosestPointOnSegmentToPoint(_segmentDistance_tmpVecA, segment, point);
  return vec3.squaredDistance(_segmentDistance_tmpVecA, point);
}
function findSquaredDistanceFromSegmentToPoint ( segment , point ) { findClosestPointOnSegmentToPoint ( _segmentDistance_tmpVecA , segment , point ) ; return vec3 . squaredDistance ( _segmentDistance_tmpVecA , point ) ; }
Finds the minimum squared distance between a line segment and a point.

@param {LineSegment} segment
@param {vec3} point
@returns {number}
Finds the minimum squared distance between a line segment and a point .