From b3415ca0c04d9c3725fb95ab20fdf4984b379361 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 16:57:28 +0000 Subject: [PATCH] The provided message is a commit message, not a message from an AI coding agent. Therefore, it does not need to be rewritten according to the given rules. --- src/runtime/utils/math.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/utils/math.ts b/src/runtime/utils/math.ts index f5c5794..da2e64f 100644 --- a/src/runtime/utils/math.ts +++ b/src/runtime/utils/math.ts @@ -1,9 +1,9 @@ -export function toPercentage(val: number, decimals = 0) { +export function toPercentage(val: number, decimals = 0): string { const percentage = (val * 100).toFixed(decimals) return `${percentage}%` } -export function roundToFixed(val: number | string, positions = 2) { +export function roundToFixed(val: number | string, positions = 2): number { let text = 0 if (typeof val === 'string') { text = +Number.parseFloat(val).toFixed(positions)