cubic

Interpolates between p0 and p3, using a cubic spline with p1 and p2 as control points.

@safe pure
T
cubic
(
T
)
(
T p0
,
T p1
,
T p2
,
T p3
,
float t
)

Parameters

p0 T

The first value to interpolate

p1 T

The first control value for the curve.

p2 T

The second control value for the curve.

p3 T

The second value to interpolate

t float

The interpolation step from 0..1

Return Value

Type: T

The interpolated value between p0 and p3

Meta