Root/
| 1 | #!/bin/sh |
| 2 | . ./Common |
| 3 | |
| 4 | ############################################################################### |
| 5 | |
| 6 | tst "bug: p2d_no_intersect could wrap around and bite itself" <<EOF |
| 7 | struct p2d *p = p2d_new(); |
| 8 | |
| 9 | p2d_append(p, v2d_new(0, 0)); |
| 10 | p2d_append(p, v2d_new(1, 27.8058649225)); |
| 11 | p2d_append(p, v2d_new(1, 2)); |
| 12 | p2d_close(p); |
| 13 | p2d_area(p, 3, 3); |
| 14 | EOF |
| 15 | |
| 16 | expect <<EOF |
| 17 | EOF |
| 18 | |
| 19 | #------------------------------------------------------------------------------ |
| 20 | |
| 21 | tst "bug: collinear path segments tripped angle_3" <<EOF |
| 22 | struct p2d *p = p2d_new(); |
| 23 | struct p2d *q; |
| 24 | |
| 25 | p2d_append(p, v2d_new(0, 0)); |
| 26 | p2d_append(p, v2d_new(1, 27.8058649225)); |
| 27 | p2d_append(p, v2d_new(1, 2.0947540869)); |
| 28 | p2d_append(p, v2d_new(1, 2)); |
| 29 | p2d_close(p); |
| 30 | q = p2d_area(p, 3, 3); |
| 31 | p2d_write_gnuplot_all(stdout, q); |
| 32 | EOF |
| 33 | |
| 34 | # Not output since the polygon is too small. This did not cause the above bug |
| 35 | # but just happened to be a property of the problem polygon. |
| 36 | |
| 37 | expect <<EOF |
| 38 | EOF |
| 39 | |
| 40 | ############################################################################### |
| 41 |
Branches:
master
