pub struct ConstantWind { /* private fields */ }Expand description
The same wind at every height.
Implementations§
Source§impl ConstantWind
impl ConstantWind
Sourcepub fn new(speed_m_s: f64, direction_from_rad: f64) -> Result<Self, AtmosError>
pub fn new(speed_m_s: f64, direction_from_rad: f64) -> Result<Self, AtmosError>
A constant wind of speed_m_s from direction_from_rad (wrapped into [0, 2π)).
§Errors
AtmosError::Domain if the speed is negative or either value is not finite.
Sourcepub fn direction_from_rad(&self) -> f64
pub fn direction_from_rad(&self) -> f64
Direction the wind blows from, in [0, 2π), rad.
Trait Implementations§
Source§impl Clone for ConstantWind
impl Clone for ConstantWind
Source§fn clone(&self) -> ConstantWind
fn clone(&self) -> ConstantWind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConstantWind
Source§impl Debug for ConstantWind
impl Debug for ConstantWind
Source§impl<'de> Deserialize<'de> for ConstantWind
impl<'de> Deserialize<'de> for ConstantWind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConstantWind
impl PartialEq for ConstantWind
Source§fn eq(&self, other: &ConstantWind) -> bool
fn eq(&self, other: &ConstantWind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConstantWind
impl Serialize for ConstantWind
impl StructuralPartialEq for ConstantWind
Source§impl Wind for ConstantWind
impl Wind for ConstantWind
Source§fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
fn wind(&self, height_msl_m: f64) -> Result<WindSample, AtmosError>
The wind at geometric height
height_msl_m above mean sea level. Read moreAuto Trait Implementations§
impl Freeze for ConstantWind
impl RefUnwindSafe for ConstantWind
impl Send for ConstantWind
impl Sync for ConstantWind
impl Unpin for ConstantWind
impl UnsafeUnpin for ConstantWind
impl UnwindSafe for ConstantWind
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