xref: /csrg-svn/lib/libplot/grn/arc.c (revision 29805)
1*29805Ssklower /*
2*29805Ssklower  * Copyright (c) 1980, 1986 Regents of the University of California.
3*29805Ssklower  * All rights reserved.  The Berkeley software License Agreement
4*29805Ssklower  * specifies the terms and conditions for redistribution.
5*29805Ssklower  */
6*29805Ssklower 
7*29805Ssklower #ifndef lint
8*29805Ssklower static char sccsid[] = "@(#)arc.c	6.1 (Berkeley) 08/29/86";
9*29805Ssklower #endif not lint
10*29805Ssklower 
11*29805Ssklower #include "grnplot.h"
12*29805Ssklower 
13*29805Ssklower 
14*29805Ssklower arc(x,y,x0,y0,x1,y1)
15*29805Ssklower {
16*29805Ssklower 	extern double atan2();
17*29805Ssklower 
18*29805Ssklower 	if (!ingrnfile) erase();
19*29805Ssklower 	endvector();
20*29805Ssklower 	printf("ARC\n");
21*29805Ssklower 	outxy(x,y);
22*29805Ssklower 	outxy(x0,y0);
23*29805Ssklower 	outxy(x1,y1);
24*29805Ssklower 	printf("*\n%d %d\n0\n",linestyle,(int) (atan2(x1-x,y1-y)-atan2(x0-x,y0-y)));
25*29805Ssklower 	curx =x;
26*29805Ssklower 	cury =y;
27*29805Ssklower }
28