private void trajectoryPath(int mouseX, int mouseY)
    {
        // method created to calculate tragectory path. 
        // calcuates distance of cursor from ball. 
        double displacedX = abs(mouseX - BALLX);
        double displacedY = abs(mouseY) - BALLY;
        // Cosine Law to isolate for hypotenuse length
        double hypotenuse = abs(sqrt(( pow(displacedX,2)+ pow(displacedY,2))- (( 2*displacedX*displacedY)*(cos(90)))));
        /**finds angle of trajectory
        // 10 represents the length of travel for each act. personal preference
        // multiply by 180/PI to convert from radians to degrees
        // abs = absolute value
        // 1 degree = 180/PI radians (MUST convert to radians to use this method */ 
        double theta = abs(atan(displacedY/displacedX));
        // pythagorean theorem        
        double actChangeX = abs((cos(theta))*8);
        // never negative so uses absolute value
        double actChangeY = abs((sin(theta))*8);  
        // assign value accordinging to left or right aim
        changeY = -actChangeY;
        if (mouseX < BALLX)
        {
            changeX = -actChangeX;
        }
        else
        {
            changeX = actChangeX;
        }
    }