0 if outside, 1 if on circumference, 2 if inside circle
| 300 | }; |
| 301 | //0 if outside, 1 if on circumference, 2 if inside circle |
| 302 | int circle_point_relation(PT p, double r, PT b) { |
| 303 | double d = dist(p, b); |
| 304 | if (sign(d - r) < 0) return 2; |
| 305 | if (sign(d - r) == 0) return 1; |
| 306 | return 0; |
| 307 | } |
| 308 | // 0 if outside, 1 if on circumference, 2 if inside circle |
| 309 | int circle_line_relation(PT p, double r, PT a, PT b) { |
| 310 | double d = dist_from_point_to_line(a, b, p); |