Click or drag to resize
DigitalRuneCurve2FGetTangent Method
Computes the tangent for a point on the curve.

Namespace: DigitalRune.Mathematics.Interpolation
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public override Vector2F GetTangent(
	float parameter
)

Parameters

parameter
Type: SystemSingle
The curve parameter.

Return Value

Type: Vector2F
The curve tangent. If the function is not differentiable at the given parameter, either the incoming or outgoing tangent is returned.

Implements

ICurveTParam, TPointGetTangent(TParam)
Remarks

The curve tangent can be used to compute the slope k of the function at the given parameter.

C#
Vector2F tangent = curve.GetTangent(0.5f); // Get the tangent at x = 0.5.
float k = tangent.Y / tangent.X;           // Compute the slope at x = 0.5.

If the curve keys contain invalid tangents, the results are undefined.

See Also