Finish AB 2

This commit is contained in:
2022-03-28 10:13:19 +02:00
parent 5158aa2cbe
commit dca869995a
4 changed files with 151 additions and 32 deletions

View File

@ -53,6 +53,10 @@ public class Body {
return SpaceDraw.massToRadius(mass);
}
public double mass() {
return mass;
}
// Returns a new body that is formed by the collision of this body and 'b'. The impulse
// of the returned body is the sum of the impulses of 'this' and 'b'.
public Body merge(Body b) {