proj/proj0/Planet.java
public double calcNetForceExertedByX(Planet[] Ps) {
        int i = 0;
        double Fx = 0;
        while (i < Ps.length) {
            if (!this.equals(Ps[i])) {
                Fx += this.calcForceExertedByX(Ps[i]);
            }
            i = i + 1;
        }
        return Fx;
    }
/** Calculate the net X force exerted by all planets.
        in that array upon the current Planet.
        Args(Array):
            Array of Planets.
        Returns(double):
            Force net X
    */
Calculate the net X force exerted by all planets.
in that array upon the current Planet.
Calculate the net X force exerted by all planets . in that array upon the current Planet .
public double calcNetForceExertedByX(Planet[] Ps) {
        int i = 0;
        double Fx = 0;
        while (i < Ps.length) {
            if (!this.equals(Ps[i])) {
                Fx += this.calcForceExertedByX(Ps[i]);
            }
            i = i + 1;
        }
        return Fx;
    }
public double calcNetForceExertedByX ( Planet [ ] Ps ) { int i = 0 ; double Fx = 0 ; while ( i < Ps . length ) { if ( ! this . equals ( Ps [ i ] ) ) { Fx += this . calcForceExertedByX ( Ps [ i ] ) ; } i = i + 1 ; } return Fx ; }
Calculate the net X force exerted by all planets.
Calculate the net X force exerted by all planets .