Sha256: 00409a7a09db0ee2ec8c88e7204d508ee2736d5c794fbc61eb9691bffed671cd
Contents?: true
Size: 401 Bytes
Versions: 4
Compression:
Stored size: 401 Bytes
Contents
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true require_relative '../dtas' # in case we need to convert DB values to a linear scale module DTAS::Util # :nodoc: def db_to_linear(val) Math.exp(val * Math.log(10) * 0.05) end def linear_to_db(val) Math.log10(val) * 20 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dtas-0.17.0 | lib/dtas/util.rb |
dtas-0.16.1 | lib/dtas/util.rb |
dtas-0.16.0 | lib/dtas/util.rb |
dtas-0.15.0 | lib/dtas/util.rb |