mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: round
This commit is contained in:
1 parent
4292081df6
commit
186ea8b458
1 file changed
+3
-2
@@ -137,8 +137,9 @@ export default function Page() {
|
|||||||
|
|
||||||
{values.map((value, index) => {
|
{values.map((value, index) => {
|
||||||
const deltaPercentage = (value ?? 1) / (values[0] ?? 1) - 1;
|
const deltaPercentage = (value ?? 1) / (values[0] ?? 1) - 1;
|
||||||
const normalizedDeltaPercentage =
|
const normalizedDeltaPercentage = Math.round(
|
||||||
Math.abs(deltaPercentage) * 100 + 25;
|
Math.min(100, Math.abs(deltaPercentage) * 100 + 25),
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table.Cell
|
<Table.Cell
|
||||||
|
|||||||
Reference in new issue
Block a user