Sha256: 2c46ef7ce4c08199d1d8cbe674007ae281ce2f06a049944db4417026653ee5f0

Contents?: true

Size: 332 Bytes

Versions: 7

Compression:

Stored size: 332 Bytes

Contents

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

UnitMeasurements::SoundLevel = UnitMeasurements.build do
  system :metric do
    primitive :dB

    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

7 entries across 7 versions & 1 rubygems

Version Path
unit_measurements-3.8.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.7.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.6.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.5.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.4.1 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.3.0 lib/unit_measurements/unit_groups/sound_level.rb
unit_measurements-3.4.0 lib/unit_measurements/unit_groups/sound_level.rb