[−][src]Function motion_planning::hermite::h_5pp
pub fn h_5pp(t: f64, n: usize) -> f64
Computes the value of the second time-derivative of a quintic Hermite basis function.
In other words, this function is the second time-derivative of the
h_5
function, or equivalently the first
time-derivative of the h_5p
function.
Examples
use motion_planning::hermite::h_5pp; // at t=0, all of h_n^5'' are `0` except for `h_2^5''`. assert_eq!(h_5pp(0., 0), 0.); assert_eq!(h_5pp(0., 1), 0.); assert_eq!(h_5pp(0., 2), 1.); assert_eq!(h_5pp(0., 3), 0.); assert_eq!(h_5pp(0., 4), 0.); assert_eq!(h_5pp(0., 5), 0.); // at t=1, all of h_n^5'' are `0` except for `h_3^5''`. assert_eq!(h_5pp(1., 0), 0.); assert_eq!(h_5pp(1., 1), 0.); assert_eq!(h_5pp(1., 2), 0.); assert_eq!(h_5pp(1., 3), 1.); assert_eq!(h_5pp(1., 4), 0.); assert_eq!(h_5pp(1., 5), 0.);
Panics
If n
is not one of 0
, 1
, 2
, 3
, 4
, or 5
, this function panics.
ⓘThis example panics
use motion_planning::hermite::h_5pp; h_5pp(t, 7);