A gem for finding the roundest number between two floats.
Roundest returns its own class of number, Floteger, in order to preserve its roundness. It is intended to be used when you are ultimately looking for pretty, i.e. string output rather than for further computation.
sudo gem install roundest
require 'roundest'
Roundest::roundest(0.00371, 0.00379).to_s
=> "0.00375"
Copyright Dan Hetherington 2018, released under the GPL 3.0.