feat: round

This commit is contained in:
TrèsAbhi committed 2024-04-05 09:38:48 -05:00
1 parent 4292081df6
commit 186ea8b458
1 file changed
+3 -2
+3 -2
View File
@@ -137,8 +137,9 @@ export default function Page() {
{values.map((value, index) => {
const deltaPercentage = (value ?? 1) / (values[0] ?? 1) - 1;
const normalizedDeltaPercentage =
Math.abs(deltaPercentage) * 100 + 25;
const normalizedDeltaPercentage = Math.round(
Math.min(100, Math.abs(deltaPercentage) * 100 + 25),
);
return (
<Table.Cell