| Curve2FGetTangent Method |
Computes the tangent for a point on the curve.
Namespace: DigitalRune.Mathematics.InterpolationAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public override Vector2F GetTangent(
float parameter
)
Public Overrides Function GetTangent (
parameter As Single
) As Vector2F
public:
virtual Vector2F GetTangent(
float parameter
) override
abstract GetTangent :
parameter : float32 -> Vector2F
override GetTangent :
parameter : float32 -> Vector2F
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.
Vector2F tangent = curve.GetTangent(0.5f);
float k = tangent.Y / tangent.X;
If the curve keys contain invalid tangents, the results are undefined.
See Also