fix(report): cap dimension scores and match zoom crops to thumbnails

This commit is contained in:
xsl
2026-10-15 20:17:07 +08:00
parent 482fb4280d
commit 5632ac43d7
13 changed files with 91 additions and 24 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ const assert = require('node:assert/strict');
const Score = require('../js/skin-score');
const dims = (firm, vita, stab) => ({ firm: { S: firm }, vita: { S: vita }, stab: { S: stab } });
for (const [scores, total] of [
[[8, 9, 8.5], 85], [[10, 10, 10], 100], [[7, 7, 7], 70],
[[8, 9, 8.5], 85], [[10, 10, 10], 99], [[7, 7, 7], 70],
[[10, 7, 7], 82], [[7, 10, 7], 79], [[7, 7, 10], 79],
[[8.01, 8.82, 8], 83], [[7.69, 8.72, 9.1], 84]
]) assert.equal(Score.weightedTotal(dims(...scores)), total, scores.join('/'));