gravitar una partícula a otra

    /**
     * @function gravitateTo
     * @param {Particle} particle
     * @memberof Particle
     */

    public gravitateTo(particle: Particle) {
        var grav = new Vector(0, 0)
        var distance = this.position.distanceTo(particle.position)

        grav.setLength(particle.mass / (distance * distance))
        grav.setAngle(this.position.angleTo(particle.position))


        this.velocity.add(grav)
    }
Himanshu Jangid