mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 08:01:02 -07:00
16 lines
373 B
TypeScript
16 lines
373 B
TypeScript
|
|
/**
|
||
|
|
* @license
|
||
|
|
* Copyright 2025 Google LLC
|
||
|
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Linearly interpolates between two values.
|
||
|
|
*
|
||
|
|
* @param start The start value.
|
||
|
|
* @param end The end value.
|
||
|
|
* @param t The interpolation amount (typically between 0 and 1).
|
||
|
|
*/
|
||
|
|
export const lerp = (start: number, end: number, t: number): number =>
|
||
|
|
start + (end - start) * t;
|