Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs17:/tmp/cvs-serv23841
Modified Files:
graph.c
Log Message:
bug fixed
Index: graph.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/graph.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** graph.c 28 Dec 2006 03:16:16 -0000 1.55
--- graph.c 11 May 2007 10:50:58 -0000 1.56
***************
*** 295,300 ****
return;
}
! *newx = onx;
! *newy = ony;
}
--- 295,326 ----
return;
}
!
! tmp = (graphPrefs.xmax - graphPrefs.xmin)/(ScrPrefs.xmax-ScrPrefs.xmin);
! if(offx>onx)
! *newx=onx+tmp;
! else
! *newx=onx-tmp;
!
! tmp = (graphPrefs.ymax - graphPrefs.ymin)/(ScrPrefs.ymin-ScrPrefs.ymax);
! if(offy>ony)
! *newy=ony+tmp;
! else
! *newy=ony-tmp;
!
! if(isinf(offy)>0 && finite(offx))
! *newy=graphPrefs.ymax;
! else
! if(isinf(offy)<0 && finite(offx))
! *newy=graphPrefs.ymin;
! else
! if(isinf(offx)>0 && finite(offy))
! *newx=graphPrefs.xmax;
! else
! if(isinf(offx)<0 && finite(offy))
! *newx=graphPrefs.xmin;
! else{
! *newx = onx;
! *newy = ony;
! }
}
***************
*** 326,330 ****
case 2:
! if(finite(y))
{
Coord xx=graph_xgr2scr(x);
--- 352,356 ----
case 2:
! if(!isnan(y))
{
Coord xx=graph_xgr2scr(x);
***************
*** 335,339 ****
break; /* polar, parametric or DRAW_AT_ONCE !=1 */
! if(yy<ScrPrefs.ymax){
if(y0<=ScrPrefs.ymax) break;
if(y0>=ScrPrefs.ymin) y0=ScrPrefs.ymin;
--- 361,365 ----
break; /* polar, parametric or DRAW_AT_ONCE !=1 */
! if(yy<ScrPrefs.ymax || isinf(y)>0){
if(y0<=ScrPrefs.ymax) break;
if(y0>=ScrPrefs.ymin) y0=ScrPrefs.ymin;
***************
*** 341,345 ****
yy=ScrPrefs.ymax;
}
! else if(yy>ScrPrefs.ymin){
if(y0>=ScrPrefs.ymin) break;
if(y0<=ScrPrefs.ymax) y0=ScrPrefs.ymax;
--- 367,371 ----
yy=ScrPrefs.ymax;
}
! else if(yy>ScrPrefs.ymin || isinf(y)<0){
if(y0>=ScrPrefs.ymin) break;
if(y0<=ScrPrefs.ymax) y0=ScrPrefs.ymax;
|