UNPKG

automation-events

Version:

A module which provides an implementation of an automation event list.

10 lines (8 loc) 326 B
import { ISetTargetAutomationEvent } from '../interfaces'; export const getTargetValueAtTime = ( time: number, valueAtStartTime: number, { startTime, target, timeConstant }: ISetTargetAutomationEvent ): number => { return target + (valueAtStartTime - target) * Math.exp((startTime - time) / timeConstant); };