pub struct Decibels { /* private fields */ }Expand description
Represents a reference-less dB value.
Implementations§
Source§impl Decibels
impl Decibels
Sourcepub fn from_amplitude(amplitude: Float, reference_amplitude: Float) -> Self
pub fn from_amplitude(amplitude: Float, reference_amplitude: Float) -> Self
Constructs Decibels from an amplitude and reference
Sourcepub fn set_amplitude(&mut self, amplitude: Float, reference_amplitude: Float)
pub fn set_amplitude(&mut self, amplitude: Float, reference_amplitude: Float)
Changes this Decibels internal dB value to match amplitude
Sourcepub fn as_amplitude(&self, reference_amplitude: Float) -> Float
pub fn as_amplitude(&self, reference_amplitude: Float) -> Float
Converts this Decibels to amplitude
Trait Implementations§
Source§impl PartialOrd for Decibels
impl PartialOrd for Decibels
impl Copy for Decibels
impl StructuralPartialEq for Decibels
Auto Trait Implementations§
impl Freeze for Decibels
impl RefUnwindSafe for Decibels
impl Send for Decibels
impl Sync for Decibels
impl Unpin for Decibels
impl UnwindSafe for Decibels
Blanket Implementations§
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