Example #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);
  }
Example #2
0
  public double getRange(double threshold) {
    if (threshold == 0) return (double) Integer.MAX_VALUE;

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