Пример #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();
   }
 }