def reflectWrtY(self):
        self.xpos = -self.xpos

    # Reflects this PointMass object with respect to the y-axis.
    def reflectWrtX(self):
        self.ypos = -self.ypos

    # Rotates this PointMass object theta radians counter clockwise 
    # around the origin.
    def rotate(self, theta):
        oldX = self.xpos
        oldY = self.ypos
        self.xpos = (math.cos(theta) * oldX) - math.sin(theta) * oldY
        self.ypos = (math.sin(theta) * oldX) + math.cos(theta) * oldY


    # OTHER METHODS

    # Computes the distance between this PointMass object and another
    # PointMass object.
    def distance(self, pm):
        dx = self.xpos - pm.getX()
        dy = self.ypos - pm.getY()
        return math.sqrt(dx ** 2.0 + dy ** 2.0)

    # Computes the gravitational force between this PointMass object 
    # and another PointMass object.
    def force(self, pm):
        G = 6.674e-11     # Nm^2/kg^2 (universal gravitational constant)
        return (G * self.mass * pm.getMass()) / (self.distance(pm) ** 2.0)
