예제 #1
0
 public Vect div(Vect b)
 {
     return(new Vect(this.x / b.x, this.y / b.y));
 }
예제 #2
0
 public Vect mult(Vect b)
 {
     return(new Vect(this.x * b.x, this.y * b.y));
 }
예제 #3
0
 public Vect sub(Vect b)
 {
     return(new Vect(this.x - b.x, this.y - b.y));
 }
예제 #4
0
 public Vect add(Vect b)
 {
     return(new Vect(this.x + b.x, this.y + b.y));
 }
예제 #5
0
 public void update()
 {
     vel    = pos.sub(oldPos);
     oldPos = pos;
     pos    = pos.add(vel.add(acc));
 }