PiecewiseLinearCurve.ValueAt Method

Gets the Y-value of the curve at the specified X-coordinate.

Definition

Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public override double ValueAt(
	double x
)

Parameters

x  Double
A real number.

Return Value

Double
The Y-value of the curve at the specified X-coordinate.

Remarks

This method returns the Y value of the point on the line between the two data points of the interval that contains x. The line on the first interval is extended to the left. The line on the last i nterval is extended to the right. If x is less than the lower bound of the first interval, the value is that of the linear function on the first interval extended to the left. If x is greater than the upper bound of the last interval, the value is that of the linear function on the last interval extended to the right.

See Also