Move println out of the loop
This commit is contained in:
parent
5d27ffc192
commit
57d228685e
@ -127,9 +127,9 @@ fn output_energy(bodies: &mut [Body; BODIES_COUNT]) {
|
|||||||
+ sqr(body.position[2] - body2.position[2]),
|
+ sqr(body.position[2] - body2.position[2]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
println!("{:.9}", energy);
|
println!("{:.9}", energy);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Steps the simulation foward by one time step
|
/// Steps the simulation foward by one time step
|
||||||
|
Loading…
Reference in New Issue
Block a user