SHARE
TWEET

Untitled

a guest Oct 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static IVector multiplyVectorByNumber(IVector a, double number) {
  2.  
  3.         double vx = a.getVx() * number;
  4.         double vy = a.getVy() * number;
  5.  
  6.         if(a instanceof Vector3D) {
  7.             double vz = ((Vector3D) a).getVz() * number;
  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
 
Top