Click or drag to resize

GdiExtensionMethodsGetParameterOnLineSegmentFromDistanceToPoint Method

If a line segment is given by this parametric equation: p(t)=(1-t)*p0 + t*p1, this function calculates the parameter t at which the point p(t) has a squared distance dsqr from the pivot point pivot. The argument chooseFarSolution determines which of two possible solutions is choosen.

Namespace: Altaxo.Graph.Gdi
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double GetParameterOnLineSegmentFromDistanceToPoint(
	PointF p0,
	PointF p1,
	PointF pivot,
	double dsqr,
	bool chooseFarSolution
)

Parameters

p0  PointF
Start point of the line segment.
p1  PointF
End point of the line segment.
pivot  PointF
Pivot point.
dsqr  Double
Squared distance from the pivot point to a point on the line segment.
chooseFarSolution  Boolean
If true, the solution with the higher t is returned, presuming that t is in the range [0,1]. If false, the solution with the lower t is returned, presuming that t is in the range[0,1]. If neither of the both solutions is in the range [0,1], NaN is returned.

Return Value

Double

[Missing <returns> documentation for "M:Altaxo.Graph.Gdi.GdiExtensionMethods.GetParameterOnLineSegmentFromDistanceToPoint(System.Drawing.PointF,System.Drawing.PointF,System.Drawing.PointF,System.Double,System.Boolean)"]

See Also