pub fn particle(pos: &mut [f64; 2], vel: &mut [f64; 2], acc: [f64; 2], dt: f64) {
        use vecmath::vec2_add as add;
        use vecmath::vec2_scale as scale;

        *vel = add(*vel, scale(acc, 0.5 * dt));
        *pos = add(*pos, scale(*vel, dt));
        *vel = add(*vel, scale(acc, 0.5 * dt));
    }
/// Update position and velocity of particle.
Update position and velocity of particle.
Update position and velocity of particle .
pub fn particle(pos: &mut [f64; 2], vel: &mut [f64; 2], acc: [f64; 2], dt: f64) {
        use vecmath::vec2_add as add;
        use vecmath::vec2_scale as scale;
        *vel = add(*vel, scale(acc, 0.5 * dt));
        *pos = add(*pos, scale(*vel, dt));
        *vel = add(*vel, scale(acc, 0.5 * dt));
    }
pub fn particle ( pos : & mut [ f64 ; 2 ] , vel : & mut [ f64 ; 2 ] , acc : [ f64 ; 2 ] , dt : f64 ) { use vecmath :: vec2_add as add ; use vecmath :: vec2_scale as scale ; * vel = add ( * vel , scale ( acc , 0.5 * dt ) ) ; * pos = add ( * pos , scale ( * vel , dt ) ) ; * vel = add ( * vel , scale ( acc , 0.5 * dt ) ) ; }
Update position and velocity of particle.
Update position and velocity of particle .
pos
&mut [f64; 2]
vel
&mut [f64; 2]
acc
[f64; 2]
dt
f64
pos
&mut [f64; 2]
vel
&mut [f64; 2]
acc
[f64; 2]
dt
f64