function getApproxIntersection(waypoints, reference) {
  return getBendpointIntersection(waypoints, reference) || getPathIntersection(waypoints, reference);
}
Returns the closest point on the connection towards a given reference point.

@param {Point[]} waypoints
@param {Point} reference

@return {Intersection|null}