diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2026-04-25 10:14:15 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2026-04-25 10:14:15 +0200 |
| commit | acf794c8ce51a78fca9531852d61c6f4dc0b140c (patch) | |
| tree | bbb7dca04eac95c203770cda90fa0e33f0c285ec /src/svg.c | |
| parent | 2dbf9aed304c69431038d3b37e614e5d45dbcc56 (diff) | |
Try to make main solve again, fail
Diffstat (limited to 'src/svg.c')
| -rw-r--r-- | src/svg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -127,7 +127,7 @@ double project_point_to_line_distance(struct point p, struct line l) { // @HACK There's a rounding error here that can cause d1 to end up // negative. Just take the abolute value of it to get around that. double d1 = fabs(glm_vec2_norm2(p.pos) - pow(c, 2)/glm_vec2_norm2(l.norm)); - assert(d1 >= 0.0); + // assert(d1 >= 0.0); double m1 = sqrt(d1 / glm_vec2_norm2(l.norm)); return SIGNOF(det) * m1; @@ -369,7 +369,7 @@ void begin_drawing(struct canvas *canvas) { assert(canvas->f != NULL); assert(canvas->state == CANVAS_INIT); - fprintf(canvas->f, "<svg version=\"1.1\" viewBox=\"-100 -150 200 200\" width=\"1200\" height=\"1200\" xmlns=\"http://www.w3.org/2000/svg\">\n"); + fprintf(canvas->f, "<svg version=\"1.1\" viewBox=\"-50 -50 100 100\" width=\"1200\" height=\"1200\" xmlns=\"http://www.w3.org/2000/svg\">\n"); fprintf(canvas->f, "<defs>\n"); fprintf(canvas->f, "\t<marker id=\"triangle\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerUnits=\"strokeWidth\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto-start-reverse\">\n"); fprintf(canvas->f, "\t\t<path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"blue\" opacity=\"0.3\" />\n"); |
