pub struct Phase(pub f64);Expand description
A phase angle in radians.
Tuple Fields§
§0: f64Implementations§
Source§impl Phase
impl Phase
Sourcepub fn new(radians: f64) -> Result<Self, SoundCoreError>
pub fn new(radians: f64) -> Result<Self, SoundCoreError>
Builds a phase, rejecting non-finite values and normalizing the angle
into the 0.0..TAU range.
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Returns this phase wrapped into the 0.0..TAU range.
Trait Implementations§
impl Copy for Phase
Source§impl PartialOrd for Phase
impl PartialOrd for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
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