olbrich / ruby-units

A unit handling library for ruby
MIT License
527 stars 109 forks source link

Issue335-Unit-format-if-numerator-is-1-in-unit-faction #348

Closed olbrich closed 2 months ago

olbrich commented 8 months ago

Fixes #335

Allows Formatting of units in exponential form (e.g., '1 m*s^-2' instead of '1 m/s^2').

Also introduces a configuration that allows this to be globally enabled.

RubyUnits.configure do |config|
  config.format = :exponential
end