Update CitationsModal.svelte

This commit is contained in:
clang88 2024-11-13 14:54:39 +01:00 committed by GitHub
parent ad0b599940
commit 67cb3455ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@
function calculatePercentage(distance: number) { function calculatePercentage(distance: number) {
if (distance < 0) return 0; if (distance < 0) return 0;
if (distance > 1) return 100; if (distance > 1) return 100;
return Math.round((distance * 10000) / 100; return Math.round(distance * 10000) / 100;
} }
function getRelevanceColor(percentage: number) { function getRelevanceColor(percentage: number) {