returns two circle c1, c2 through points a, b and of radius r 0 if there is no such circle, 1 if one circle, 2 if two circle
| 354 | // returns two circle c1, c2 through points a, b and of radius r |
| 355 | // 0 if there is no such circle, 1 if one circle, 2 if two circle |
| 356 | int get_circle(PT a, PT b, double r, circle &c1, circle &c2) { |
| 357 | vector<PT> v = circle_circle_intersection(a, r, b, r); |
| 358 | int t = v.size(); |
| 359 | if (!t) return 0; |
| 360 | c1.p = v[0], c1.r = r; |
| 361 | if (t == 2) c2.p = v[1], c2.r = r; |
| 362 | return t; |
| 363 | } |
| 364 | // returns two circle c1, c2 which is tangent to line u, goes through |
| 365 | // point q and has radius r1; 0 for no circle, 1 if c1 = c2 , 2 if c1 != c2 |
| 366 | int get_circle(line u, PT q, double r1, circle &c1, circle &c2) { |
nothing calls this directly
no test coverage detected