1 2 3 4 5 6 7 8 9 10 11 12
use crate::vector_2d::Vector2D; pub struct Particle2D { pub position: Vector2D, pub mass: f64, } impl Particle2D { pub fn new(position: Vector2D, mass: f64) -> Self { Self { position, mass } } }
1 2 3 4 5 6 7 8 9 10 11 12
use crate::vector_2d::Vector2D; pub struct Particle2D { pub position: Vector2D, pub mass: f64, } impl Particle2D { pub fn new(position: Vector2D, mass: f64) -> Self { Self { position, mass } } }