@ztimson/utils / math
dec2Frac(num): string
num
string
Convert decimal number to fraction
• num: number
number
Number to convert
Fraction with remainder
dec2Frac(1.25) // Outputs: "1 1/4"
src/math.ts:12
fracToDec(frac): number
frac
Convert fraction to decimal number
• frac: string
Fraction to convert
Faction as a decimal
fracToDec('1 1/4') // Outputs: 1.25
src/math.ts:40
Deleting the wiki page "math" cannot be undone. Continue?