code: plan9front

ref: 5622b0bbd878dbc34045cc6fd37cffa64461eabe
dir: /sys/src/cmd/plot/libplot/poly.c/

View raw version
#include "mplot.h"
void plotpoly(int num[], double *ff[]){
	double *xp, *yp, **fp;
	int i, *n;
	n = num;
	fp = ff;
	while((i = *n++)){
		xp = *fp++;
		yp = xp+1;
		move(*xp, *yp);
		while(--i){
			xp += 2;
			yp += 2;
			vec(*xp, *yp);
		}
	}
}