import { velocityPerSecond } from '../../../../../../../../motion-utils@12.36.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs';

const velocitySampleDuration = 5; // ms
function getGeneratorVelocity(resolveValue, t, current) {
    const prevT = Math.max(t - velocitySampleDuration, 0);
    return velocityPerSecond(current - resolveValue(prevT), t - prevT);
}

export { getGeneratorVelocity };
