Function synfx_dsp::coef2gain_db
source · [−]Expand description
Converts a coefficient/factor to decibels
use synfx_dsp::coef2gain_db;
assert!((coef2gain_db(0.501187) - -6.0).abs() < 0.0001);
assert!((coef2gain_db(0.707945) - -3.0).abs() < 0.0001);
assert!(coef2gain_db(1.0).abs() < 0.00001);
assert!((coef2gain_db(1.99526) - 6.0).abs() < 0.0001);