% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callingWaterfall.R
\name{.distancePointSegment}
\alias{.distancePointSegment}
\title{Calculate shortest distance between point and line segment}
\usage{
.distancePointSegment(x, y, x1, y1, x2, y2)
}
\arguments{
\item{x}{x-coordinate of point}

\item{y}{y-coordinate of point}

\item{x1}{x-coordinate of one endpoint of the line segment}

\item{y1}{y-coordinate of line segment endpoint with x-coordinate x1}

\item{x2}{x-coordinate of other endpoint of line segment}

\item{y2}{y-coordinate of line segment endpoint with x-coordinate x2}
}
\value{
\code{numeric} The shortest distance between a point and a line
segment
}
\description{
This function calculates the shortest distance between a point
and a line segment in 2D space.
}
\examples{
.distancePointSegment(0, 0, -1, 1, 1, -1)

}
\keyword{internal}
