diff --git a/js/misc/util.js b/js/misc/util.js index 314d7660f..2da489bbe 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -1,7 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- /* exported findUrls, spawn, spawnCommandLine, spawnApp, trySpawnCommandLine, formatTime, formatTimeSpan, createTimeLabel, insertSorted, - ensureActorVisibleInScrollView, wiggle */ + ensureActorVisibleInScrollView, wiggle, lerp */ const { Clutter, Gio, GLib, Shell, St, GnomeDesktop } = imports.gi; const Gettext = imports.gettext; @@ -435,3 +435,7 @@ function wiggle(actor, params) { }, }); } + +function lerp(start, end, progress) { + return start + progress * (end - start); +}