PiecewiseLinearCurve.SlopeAt Method

Gets the slope of the curve at the specified X-coordinate.

Definition

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

Parameters

x  Double
A real number.

Return Value

Double
The slope of the curve at the specified X-coordinate.

Remarks

For most values of x, this method returns the slope on the line segment on the interval that contains x. If x is less than the lower bound of the first interval, the value returned is the slope of the line segment on the first interval. If x is greater than the upper bound of the last interval, the value returned is the slope of the line segment on the last interval. If x is equal to the boundary of an interval, and the line segments on either side of the point have different slopes, the result is NaN.

See Also