CodeSnip News
A repository for source code snippets, designed with Pascal in mind.
Brought to you by:
delphidabbler
Three new routines for working with fractions have been added to the Code Snippets Database. NormaliseFractionSize ensures that the numerator of a fraction carries the sign while the denominator is always positive. The remaining two routines are for formatting a fraction as a string. FractionToStr formats a given numerator and denominator while FractionToStrEx does the same thing but also gives the option of normalising the fraction's sign.
link