5 lines
230 B
TypeScript
5 lines
230 B
TypeScript
import type { LearningPath } from "@/data-objects/learning-paths/learning-path.ts";
|
|
|
|
export function calculateProgress(lp: LearningPath): number {
|
|
return ((lp.amountOfNodes - lp.amountOfNodesLeft) / lp.amountOfNodes) * 100;
|
|
}
|