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