pub struct EmfSource {
pub x: f64,
pub y: f64,
pub z: f64,
pub amplitude: f64,
pub frequency: f64,
pub phase: f64,
}Expand description
One EMF source: position, amplitude, frequency, phase.
Fields§
§x: f64§y: f64§z: f64§amplitude: f64§frequency: f64§phase: f64Implementations§
Source§impl EmfSource
impl EmfSource
Sourcepub fn parse_flat(flat: &[f64]) -> Result<Vec<Self>, PhysicsError>
pub fn parse_flat(flat: &[f64]) -> Result<Vec<Self>, PhysicsError>
Parse a flat &[f64] array into a slice of sources.
Each source occupies 6 consecutive values: [x, y, z, A, f, φ].
Sourcepub fn distance_to(&self, x: f64, y: f64, z: f64) -> f64
pub fn distance_to(&self, x: f64, y: f64, z: f64) -> f64
Distance from this source to an observation point.
Sourcepub fn wave_number(&self, c: f64) -> f64
pub fn wave_number(&self, c: f64) -> f64
Wave number k = 2π·f / c.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmfSource
impl RefUnwindSafe for EmfSource
impl Send for EmfSource
impl Sync for EmfSource
impl Unpin for EmfSource
impl UnsafeUnpin for EmfSource
impl UnwindSafe for EmfSource
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more