pub struct Ball {
pub x: f64,
pub y: f64,
pub vx: f64,
pub vy: f64,
pub radius: f64,
pub mass: f64,
pub trail: Vec<(f64, f64)>,
}Expand description
A single ball in the simulation.
Fields§
§x: f64§y: f64§vx: f64§vy: f64§radius: f64§mass: f64§trail: Vec<(f64, f64)>Trail of recent positions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ball
impl RefUnwindSafe for Ball
impl Send for Ball
impl Sync for Ball
impl Unpin for Ball
impl UnsafeUnpin for Ball
impl UnwindSafe for Ball
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