Move println out of the loop

This commit is contained in:
Timothy Warren 2020-01-14 09:33:17 -05:00
parent 5d27ffc192
commit 57d228685e

View File

@ -127,10 +127,10 @@ fn output_energy(bodies: &mut [Body; BODIES_COUNT]) {
+ sqr(body.position[2] - body2.position[2]),
);
}
}
println!("{:.9}", energy);
}
}
/// Steps the simulation foward by one time step
fn advance(bodies: &mut [Body; BODIES_COUNT]) {