예제 #1
0
 public void subtract(Force other) {
   if (other != null) {
     x -= other.x();
     y -= other.y();
   }
 }
예제 #2
0
 public void add(Force other) {
   if (other != null) {
     x += other.x();
     y += other.y();
   }
 }