misc.cpp
changeset 789 d85834ad8c54
parent 617 7ee5bf3647d3
child 792 7d67be709091
     1.1 --- a/misc.cpp	Tue Aug 18 12:39:07 2009 +0000
     1.2 +++ b/misc.cpp	Mon Aug 24 14:39:07 2009 +0000
     1.3 @@ -49,40 +49,6 @@
     1.4  	}	
     1.5  }
     1.6  
     1.7 -QPointF normalise(const QPointF &p)
     1.8 -{	
     1.9 -	// Calculate normalised position (fixed length) 
    1.10 -
    1.11 -	qreal px=p.x();
    1.12 -	qreal py=p.y();
    1.13 -	qreal x;
    1.14 -	qreal y;
    1.15 -	qreal r=150;
    1.16 -
    1.17 -	if (px==0)
    1.18 -	{
    1.19 -		x=0;
    1.20 -		if (py>=0)
    1.21 -			y=r;
    1.22 -		else
    1.23 -			y=-r;
    1.24 -	} else
    1.25 -	{
    1.26 -		qreal sign;
    1.27 -		qreal a;
    1.28 -		if (px>0) 
    1.29 -			sign=1; 
    1.30 -		else 
    1.31 -			sign=-1;
    1.32 -		
    1.33 -		a=atan (py / px);
    1.34 -		x=cos (a) * r *sign;
    1.35 -		y=sin (a) * r *sign;
    1.36 -	}	
    1.37 -	return QPoint ((int) (x),(int) (y));
    1.38 -}
    1.39 -
    1.40 -
    1.41  qreal max(qreal a, qreal b)
    1.42  {
    1.43  	if (a>b)