From 5709b7323ca39dd1397720fc0b13a587638967f1 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 16 Apr 2026 17:22:27 -0700 Subject: add estimated CPS needed to type current line --- src/app/game/game.utils.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/app/game/game.utils.ts') diff --git a/src/app/game/game.utils.ts b/src/app/game/game.utils.ts index 6177d2c..4c99c55 100644 --- a/src/app/game/game.utils.ts +++ b/src/app/game/game.utils.ts @@ -42,6 +42,10 @@ export function parseLrcLines(lrcText: string): GameLine[] { return result; } +export function calculateCPSNeeded(text: string, seconds: number): number { + return text.length / seconds; +} + export function formatTime(ms: number): string { const s = Math.max(0, Math.floor(ms / 1000)); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; -- cgit v1.2.3