add score "edit" mode
Some checks are pending
Deploy Website / deploy (push) Waiting to run
Deploy Backend / deploy (push) Successful in 2m32s

This commit is contained in:
Lee
2024-10-12 07:21:55 +01:00
parent f26b997fbb
commit 98e8273c07
12 changed files with 328 additions and 51 deletions

View File

@ -0,0 +1,14 @@
export class CurvePoint {
constructor(
private acc: number,
private multiplier: number
) {}
getAcc(): number {
return this.acc;
}
getMultiplier(): number {
return this.multiplier;
}
}

View File

@ -0,0 +1,29 @@
/**
* Clamps a value between two values.
*
* @param value the value
* @param min the minimum
* @param max the maximum
*/
export function clamp(value: number, min: number, max: number) {
if (min !== null && value < min) {
return min;
}
if (max !== null && value > max) {
return max;
}
return value;
}
/**
* Lerps between two values.
*
* @param v0 value 0
* @param v1 value 1
* @param t the amount to lerp
*/
export function lerp(v0: number, v1: number, t: number) {
return v0 + t * (v1 - v0);
}