feat(guides): add structured image-first editor
CI / Verify (push) Successful in 1m0s
CI / Build immutable images and deploy (push) Failing after 2m38s

This commit is contained in:
2026-08-29 13:30:52 +00:00 Unverified
parent b8e3b99033
commit dc5c667b4e
36 changed files with 5611 additions and 381 deletions
+11
View File
@@ -0,0 +1,11 @@
export function calculateTeamMetrics(damage: number[], rotationSeconds: number) {
const totalDamage = damage.reduce((sum, value) => sum + value, 0);
if (!Number.isFinite(rotationSeconds) || rotationSeconds <= 0 || damage.some((value) => !Number.isFinite(value) || value < 0) || totalDamage <= 0) {
throw new Error("Team damage and rotation must be positive finite values.");
}
return {
totalDamage,
totalDps: totalDamage / rotationSeconds,
shares: damage.map((value) => value / totalDamage * 100),
};
}