Ejemplo n.º 1
0
  public double getForce(Tile tile) {
    int radius = Methods.distance(source, tile);
    double ForceG;

    return G * source.getMass() * tile.getMass() / Math.pow(radius, 2);
  }
Ejemplo n.º 2
0
  public double getRange(double threshold) {
    if (threshold == 0) return (double) Integer.MAX_VALUE;

    return G * source.getMass() / threshold;
  }