percentage
A function that takes a value and a total value and calculates the percentage.
Code
Interface
typescript
function percentage(value: number, total: number): number
Usage
typescript
import { percentage } from '@modern-kit/utils';
const result1 = percentage(10, 100); // 10
const result2 = percentage(66.666, 100); // 66.67