pub struct Decibel {
pub reference: f64,
pub factor: f64,
}Fields§
§reference: f64§factor: f64Implementations§
Source§impl Decibel
impl Decibel
pub fn amplitude(reference: f64) -> Decibel
pub fn power(reference: f64) -> Decibel
pub fn volt() -> Decibel
pub fn millivolt() -> Decibel
pub fn microvolt() -> Decibel
pub fn ampere() -> Decibel
pub fn milliampere() -> Decibel
pub fn microampere() -> Decibel
pub fn sound_pressure() -> Decibel
pub fn watt() -> Decibel
pub fn milliwatt() -> Decibel
pub fn to_db(&self, linear: f64) -> f64
pub fn to_linear(&self, db: f64) -> f64
pub fn is_compatible(&self, other: &Decibel) -> bool
pub fn offset_from(&self, other: &Decibel) -> Option<f64>
Trait Implementations§
impl Copy for Decibel
impl StructuralPartialEq for Decibel
Auto Trait Implementations§
impl Freeze for Decibel
impl RefUnwindSafe for Decibel
impl Send for Decibel
impl Sync for Decibel
impl Unpin for Decibel
impl UnsafeUnpin for Decibel
impl UnwindSafe for Decibel
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more