MCPcopy Index your code
hub / github.com/EngoEngine/engo / PointDistance

Method PointDistance

math.go:336–338  ·  view source on GitHub ↗

PointDistance Returns the euclidean distance from the point p to the line segment l

(point Point)

Source from the content-addressed store, hash-verified

334// PointDistance Returns the euclidean distance from the point p to the
335// line segment l
336func (l *Line) PointDistance(point Point) float32 {
337 return math.Sqrt(l.PointDistanceSquared(point))
338}
339
340// PointDistanceSquared returns the squared euclidean distance from the point p
341// to the line segment l

Callers 5

MagnitudeMethod · 0.45
LineTraceFractionFunction · 0.45
TestPointPointDistanceFunction · 0.45
TestLinePointDistanceFunction · 0.45
triangleAreaFunction · 0.45

Calls 2

PointDistanceSquaredMethod · 0.95
SqrtFunction · 0.92

Tested by 2

TestPointPointDistanceFunction · 0.36
TestLinePointDistanceFunction · 0.36