private void adjustScale(double v, double theta)
    {    
        int i = 0;
        while (i < _launchVelocity.length && theta > _launchAngle[i])
            i++;
        if (i == 0)
            i = 1;
        
        double temp = v / _launchVelocity[i-1];
            
        // avoid setting velocity to NaN
        if (temp != temp)
            return;
            
        // ignore very large changes
        if (temp > 1.1 || temp < 0.9)
           {
        	//System.out.println(" temp : " + temp);
        	return;
           }
                   
        if (theta > Math.toRadians(50))    
            _scaleFactor = temp;
        else if (theta > Math.toRadians(25))
            _scaleFactor = temp * 0.6 + _scaleFactor * 0.4;
                            
    }