Table of Contents

Method Evaluate

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Evaluate(float)

Evaluates the curve at the given input and returns the result.

T Evaluate(float input)

Parameters

input float

The input for which output is sought.

Returns

T

Remarks

If the input is below the inputMin given in the constructor, the output is clamped to the first output sample.

If the input is above the inputMax given in the constructor, the output is clamped to the last output sample.

Otherwise, an index is calculated, and the output is interpolated between outputSample[index] and outputSample[index + 1].