(num: number, decimalPlaces = 0)
| 1 | import { BenchmarkFunction } from "./benchmark_types"; |
| 2 | |
| 3 | export function toFixed(num: number, decimalPlaces = 0): string { |
| 4 | return string.format(`%.${decimalPlaces}f`, num); |
| 5 | } |
| 6 | |
| 7 | export function calculatePercentageChange(oldValue: number, newValue: number): number { |
| 8 | return (newValue / oldValue) * 100 - 100; |
no outgoing calls
no test coverage detected