public static double[] line_circle_p(double x0, double y0, double x1, double y1, double cx, double cy, double r){
		double[] result = NONE;
		double f = (x1 - x0);
		double g = (y1 - y0);
		double fSQ = f*f;
		double gSQ = g*g;
		double fgSQ = fSQ + gSQ;

		double xc0 = cx - x0;
		double yc0 = cy - y0;

		double fygx = f*yc0 - g*xc0;
		double root = r*r*fgSQ - fygx*fygx;
		if(root > -ACCY){
			double[] temp = null;
			int np = 0;
			double fxgy = f*xc0 + g*yc0;
			if(root < ACCY){		// tangent so just one point
				double t = fxgy / fgSQ;
				if(t >= 0 && t <= 1)
					temp = new double[] { x0 + f*t, y0 + g*t};
				np = 2;
			}
			else {	// possibly two intersections
				temp = new double[4];
				root = Math.sqrt(root);
				double t = (fxgy - root)/fgSQ;
				if(t >= 0 && t <= 1){
					temp[np++] = x0 + f*t;
					temp[np++] = y0 + g*t;
				}
				t = (fxgy + root)/fgSQ;
				if(t >= 0 && t <= 1){
					temp[np++] = x0 + f*t;
					temp[np++] = y0 + g*t;
				}
			}
			if(temp != null){
				result = new double[np];
				System.arraycopy(temp, 0, result, 0, np);
			}
		}
		return result;
	}