UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

13 lines 592 B
/** * NOTE: this operation has O(n) complexity, where n is the number of keys in the curve. * @param {AnimationCurve} curve * @param {number} ref_time * @param {number} ref_value * @returns {number} time of the nearest point on the curve * @see AnimationCurve * @example * const nearest_time = animation_curve_nearest_point(curve, 0.5, 10); * const nearest_value = curve.evaluate(nearest_time); */ export function animation_curve_nearest_point(curve: AnimationCurve, ref_time: number, ref_value: number): number; //# sourceMappingURL=animation_curve_nearest_point.d.ts.map