From d9b8f0d540d1506b1fc885b6e0b87adb8374cf8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 9 Jul 2021 15:58:35 +0200 Subject: [PATCH] Add docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/utils/AnimationUtils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utils/AnimationUtils.ts b/src/utils/AnimationUtils.ts index 9654bdeb11..0ade08df84 100644 --- a/src/utils/AnimationUtils.ts +++ b/src/utils/AnimationUtils.ts @@ -14,6 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ +/** + * This method linearly interpolates between two points (start, end). This is + * most commonly used to find a point some fraction of the way along a line + * between two endpoints (e.g. to move an object gradually between those + * points). + * @param {number} start the starting point + * @param {number} end the ending point + * @param {number} amt the interpolant + * @returns + */ export function lerp(start: number, end: number, amt: number) { return (1 - amt) * start + amt * end; }