Velocity and acceleration are central differences with
h = {@link CENTRAL_DIFFERENCE_STEP} (see the module note on why that value).
The callback is invoked twice per velocity sample and three times per
acceleration sample.
The three scratch vectors are per instance, so sampling allocates nothing when
out is passed — provided the callback does not allocate either. Each
callback result is copied into scratch before the next call, so a callback
that ignores out and returns its own vector still produces correct
differences.
§13's "custom parametric trajectory": any position function of time.
Velocity and acceleration are central differences with
h = {@link CENTRAL_DIFFERENCE_STEP}(see the module note on why that value). The callback is invoked twice per velocity sample and three times per acceleration sample.The three scratch vectors are per instance, so sampling allocates nothing when
outis passed — provided the callback does not allocate either. Each callback result is copied into scratch before the next call, so a callback that ignoresoutand returns its own vector still produces correct differences.