core / com.acmerobotics.roadrunner.path / NthDegreePolynomial

NthDegreePolynomial

class NthDegreePolynomial

Nth-degree polynomial interpolated according to the provided derivatives. Note that this implementation is less performant than QuinticPolynomial as it uses general matrix operations for derivative computations.

Parameters

start - start derivatives starting with the 0th derivative

end - end derivatives starting with the 0th derivative

Constructors

<init>

NthDegreePolynomial(start: List<Double>, end: List<Double>)

Nth-degree polynomial interpolated according to the provided derivatives. Note that this implementation is less performant than QuinticPolynomial as it uses general matrix operations for derivative computations.

Functions

deriv

fun deriv(t: Double): Double

Returns the derivative of the polynomial at t.

get

operator fun get(t: Double): Double

Returns the value of the polynomial at t.

secondDeriv

fun secondDeriv(t: Double): Double

Returns the second derivative of the polynomial at t.

thirdDeriv

fun thirdDeriv(t: Double): Double

Returns the third derivative of the polynomial at t.