Sha256: 482327a2ee8258a271b876d3ed869f2ab481d4038acaf191b4b4e5bab0868a24

Contents?: true

Size: 338 Bytes

Versions: 19

Compression:

Stored size: 338 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

UnitMeasurements::SoundLevel = UnitMeasurements.build do
  primitive "dB"

  system :metric do
    si_unit "B", aliases: ["bel", "bels"]
  end

  unit "Np", value: [(20 / Math.log(10)), "dB"], aliases: ["neper", "nepers"] # (20 / ln(10)) dB
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
unit_measurements-5.4.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-5.3.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-5.2.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-5.1.1 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-5.1.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-5.0.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.12.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.11.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.10.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.9.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.8.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.7.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.6.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.5.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.4.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.3.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.2.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.1.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-4.0.0 lib/unit_measurements/unit_groups/sound_level.rb