Move println out of the loop
This commit is contained in:
parent
5d27ffc192
commit
57d228685e
@ -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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user