Package math

Examples of math.Vector.reset()


  }

  public static Vector getGForce(double m1, double m2, Vector pos1, Vector pos2) {
    Vector dir = pos1.clone().invert().add(pos2);
    double r = dir.getLength();
    return (r < 0.0005f) ? dir.reset()
      : dir.scale(G * m1 * m2 / (r * r * r));
  }
 
  /**
   * Simulates a collision between two objects. As result of the simulation,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.