pub struct OrbitBody {
pub mass: OrbitMass,
pub position: Position3D,
pub velocity: Velocity3D,
}Expand description
Body state in the N-body system.
Fields§
§mass: OrbitMass§position: Position3D§velocity: Velocity3DImplementations§
Source§impl OrbitBody
impl OrbitBody
Sourcepub fn new(mass: OrbitMass, position: Position3D, velocity: Velocity3D) -> Self
pub fn new(mass: OrbitMass, position: Position3D, velocity: Velocity3D) -> Self
Create a new orbital body.
Sourcepub fn kinetic_energy(&self) -> f64
pub fn kinetic_energy(&self) -> f64
Calculate kinetic energy (J).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrbitBody
impl RefUnwindSafe for OrbitBody
impl Send for OrbitBody
impl Sync for OrbitBody
impl Unpin for OrbitBody
impl UnsafeUnpin for OrbitBody
impl UnwindSafe for OrbitBody
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