Closed mskogholt closed 1 day ago
I opened a PR for this: https://github.com/albertodev01/fraction/pull/30
The toStringAsGlyph will throw an error in this case anyway since 0/1 is not a valid glyph, so I left that as is.
Thanks for your PR!! This week I'll merge it and create a new release 🙂 Sorry for the late reply but I've been on vacations and I'll be back tomorrow
Is your feature request related to a problem? Please describe. When using the toString() method of the MixedFraction there is a check whether $whole == 0 (and omits it if it is), which is great, except when using this on whole numbers the string representations becomes 'x 0/1', where x = the whole number.
Describe the solution you'd like I think it would be great to omit the fractional part in this case and simply return x.
I would think simply an added check such as this would suffice:
Maybe the same for the toStringAsGlyph method