pub struct Eccentricity(f64);Expand description
Eccentricity with validation. For elliptical orbits: 0 <= e < 1 For parabolic: e == 1 For hyperbolic: e > 1
Tuple Fields§
§0: f64Implementations§
Source§impl Eccentricity
impl Eccentricity
Sourcepub fn elliptical(e: f64) -> Option<Self>
pub fn elliptical(e: f64) -> Option<Self>
Create eccentricity for an elliptical orbit (0 <= e < 1). Returns None if out of range.
pub fn value(self) -> f64
pub fn is_circular(&self) -> bool
pub fn is_elliptical(&self) -> bool
pub fn is_parabolic(&self) -> bool
pub fn is_hyperbolic(&self) -> bool
Trait Implementations§
Source§impl Clone for Eccentricity
impl Clone for Eccentricity
Source§fn clone(&self) -> Eccentricity
fn clone(&self) -> Eccentricity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Eccentricity
impl Debug for Eccentricity
Source§impl Display for Eccentricity
impl Display for Eccentricity
Source§impl PartialEq for Eccentricity
impl PartialEq for Eccentricity
Source§impl PartialOrd for Eccentricity
impl PartialOrd for Eccentricity
impl Copy for Eccentricity
impl StructuralPartialEq for Eccentricity
Auto Trait Implementations§
impl Freeze for Eccentricity
impl RefUnwindSafe for Eccentricity
impl Send for Eccentricity
impl Sync for Eccentricity
impl Unpin for Eccentricity
impl UnwindSafe for Eccentricity
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