elm-round icon indicating copy to clipboard operation
elm-round copied to clipboard

Added roundSig

Open hasko opened this issue 3 years ago • 1 comments

I found it useful to round a float to a given number of significant digits, i.e. roundSig 3 1234.5 would give "1230" while roundSig 3 1.2345 would give "1.23". I need this because I'm working with exponential scales. I thought it might be a simple but useful extension to this module. Closes #11.

hasko avatar Feb 28 '22 12:02 hasko

Thank you for your PR!

Would it make sense to have floorSig and ceilingSig variants also?

myrho avatar Feb 28 '22 19:02 myrho