Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 | 50x 250x | // Renders a share for a human-readable assignment summary. A zero total is a real outcome
// - nobody left to place, or no program items with lottery sign-ups - and reads better as
// 0% than as the NaN% a plain division would produce.
export const toPercentage = (part: number, total: number): string =>
total === 0 ? "0%" : `${Math.round((part / total) * 100)}%`;
|