core-extra icon indicating copy to clipboard operation
core-extra copied to clipboard

Incorporate some of the functionality from ianmackenzie/elm-float-extra?

Open ianmackenzie opened this issue 3 months ago • 3 comments

This new package looks great and I'd love to update our code at work to use it, but it currently conflicts with the Float.Extra module in my own ianmackenzie/elm-float-extra package. Any interest in a PR merging at least some of the functionality from my package into the Float.Extra module in this package, so that my package can be deprecated? At a quick glance:

  • equalWithin seems like a useful more-explicit/more-customizable version of aboutEqual (might need to double-check that infinities and NaNs are handled the same way, but it looks to me like they are)
  • interpolateFrom is one I use quite a lot so I think would be a good addition
  • My version of range conflicts with the existing range function, but as mentioned in the docs for my version of range you can replicate its functionality (with more flexibility) using Float.Extra.interpolateFrom with functions from my elm-1d-parameter package, so that one can probably be left out. (I do think generating ranges of Float values based on a number of steps instead of a step size is generally a more robust and less error-prone way to do it, though.)

ianmackenzie avatar Mar 10 '24 04:03 ianmackenzie