SHARE
TWEET

Untitled

a guest Oct 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static IVector subtractVectors(IVector a, IVector b) {
  2.  
  3.         double vx = a.getVx() - b.getVx();
  4.         double vy = a.getVy() - b.getVy();
  5.  
  6.         if(a instanceof Vector3D && b instanceof Vector3D) {
  7.             double vz = ((Vector3D) a).getVz() - ((Vector3D) b).getVz();
  8.             return new Vector3D(vx, vy, vz);
  9.         }
  10.         return new Vector(vx, vy);
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top