Reformat
This commit is contained in:
parent
8c08349b04
commit
b4113effa7
@ -95,8 +95,7 @@ static mut solar_Bodies: [body; BODIES_COUNT] = [
|
||||
fn offset_Momentum(bodies: &mut [body; BODIES_COUNT]) {
|
||||
for i in 0..BODIES_COUNT {
|
||||
for m in 0..3 {
|
||||
bodies[0].velocity[m] -=
|
||||
bodies[i].velocity[m] * bodies[i].mass / SOLAR_MASS;
|
||||
bodies[0].velocity[m] -= bodies[i].velocity[m] * bodies[i].mass / SOLAR_MASS;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -175,8 +174,7 @@ unsafe fn advance(bodies: &mut [body; BODIES_COUNT]) {
|
||||
for i in 0..BODIES_COUNT - 1 {
|
||||
for j in i + 1..BODIES_COUNT {
|
||||
for m in 0..3 {
|
||||
position_Deltas[m].0[k] =
|
||||
bodies[i].position[m] - bodies[j].position[m];
|
||||
position_Deltas[m].0[k] = bodies[i].position[m] - bodies[j].position[m];
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user