Castle Game Engine: CastleCurves: Class TNaturalCubicSpline

# Class TNaturalCubicSpline
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleCurves ## Declaration `type TNaturalCubicSpline = class(TObject)` ## Description Natural cubic spline (1D). May be periodic or not. ## Hierarchy TObject TNaturalCubicSpline ## Overview ### Methods
| `constructor Create(X, Y: TFloatList; AOwnsX, AOwnsY, APeriodic: boolean);`
| `destructor Destroy; override;`
| `function Evaluate(x: Float): Float;`
### Properties
| `property MinX: Float read FMinX;`
| `property MaxX: Float read FMaxX;`
| `property Periodic: boolean read FPeriodic;`
## Description ### Methods
| `constructor Create(X, Y: TFloatList; AOwnsX, AOwnsY, APeriodic: boolean);`
Constructs natural cubic spline such that for every i in [0; X.Count-1] s(X[i]) = Y[i]. Must be X.Count = Y.Count. X must be already sorted. MinX = X[0], MaxX = X[X.Count-1]. Warning: we will copy references to X and Y ! So make sure that these objects are available for the life of this object. We will free in destructor X if OwnsX and free Y if OwnsY.
| `destructor Destroy; override;`
| `function Evaluate(x: Float): Float;`
Evaluate value of natural cubic spline at x. Must be MinX <= x <= MaxX.
### Properties
| `property MinX: Float read FMinX;`
| `property MaxX: Float read FMaxX;`
| `property Periodic: boolean read FPeriodic;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09