Sha256: f051cc46476e0e1abceedf7d87a43febbfd889a8d852da2c3076e1fd639b36ef

Contents?: true

Size: 224 Bytes

Versions: 42

Compression:

Stored size: 224 Bytes

Contents

class Numeric

  #
  # +ampdb+: linear to dB converter
  #
  # interprets its receiver as a linear value and returns it in dB
  #
  def ampdb
    raise Mext::NegativeNumeric if self < 0.0
    20*Math::log10(self)
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
ruby-mext-0.21.6 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.5 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.4 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.3 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.2 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.1 lib/mext/numeric/ampdb.rb
ruby-mext-0.21.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.20.1 lib/mext/numeric/ampdb.rb
ruby-mext-0.20.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.19.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.18.3 lib/mext/numeric/ampdb.rb
ruby-mext-0.18.2 lib/mext/numeric/ampdb.rb
ruby-mext-0.18.1 lib/mext/numeric/ampdb.rb
ruby-mext-0.18.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.17.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.16.2 lib/mext/numeric/ampdb.rb
ruby-mext-0.16.1 lib/mext/numeric/ampdb.rb
ruby-mext-0.16.0 lib/mext/numeric/ampdb.rb
ruby-mext-0.15.3 lib/mext/numeric/ampdb.rb
ruby-mext-0.15.2 lib/mext/numeric/ampdb.rb