Method IntegrateCurve
IntegrateCurve(float[], AnimationCurve)
Numerically integrate a given AnimationCurve using the specified number of samples. Based on https://en.wikipedia.org/wiki/Numerical_integration and http://blog.s-schoener.com/2018-05-05-animation-curves/ Using the trapezoidal rule for numerical interpolation
Declaration
public static void IntegrateCurve(float[] array, AnimationCurve curve)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The array to fill with integrated values |
AnimationCurve | curve | The animation curve to sample integrate |
Exceptions
Type | Condition |
---|---|
ArgumentException |