Bug fix in Trajectory.resampleTime()