Click or drag to resize

Math3DGetFractionalIndexOfPointOnLineInGivenDistanceToAnotherPoint Method

Gets the fractional index of the point on a line that has a certain distance to another point ps.

Namespace: Altaxo.Geometry
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double GetFractionalIndexOfPointOnLineInGivenDistanceToAnotherPoint(
	PointD3D p0,
	PointD3D p1,
	PointD3D ps,
	double distance
)

Parameters

p0  PointD3D
The start point of the line.
p1  PointD3D
The end point of the line.
ps  PointD3D
The other point.
distance  Double
The given distance.

Return Value

Double
A relative index on the line [0..1] for the point on the line that has the provided distance to the point ps. If the point ps is too far away, the result will be double.NaN. If the point ps is too close, the result can be outside the interval [0,1].
See Also