From 73e446a99b3045a19bdd2be4238b4178502398ae Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Tue, 10 Feb 2026 23:25:43 +0100 Subject: Add place for examples and fix some bugs that make the examples not work! --- src/construction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/construction.c') diff --git a/src/construction.c b/src/construction.c index 23f02a7..090a36f 100644 --- a/src/construction.c +++ b/src/construction.c @@ -36,9 +36,9 @@ bool circle_line_intersect(struct circle circle, struct line line, uint8_t root, } void line_through_points(struct point p1, struct point p2, struct line* l) { - l->norm[0] = p1.pos[1] - p1.pos[1]; + l->norm[0] = p1.pos[1] - p2.pos[1]; l->norm[1] = p2.pos[0] - p1.pos[0]; - l->C = p1.pos[1] * -l->norm[1] + p1.pos[0] * -l->norm[1]; + l->C = p1.pos[0] * -l->norm[0] + p1.pos[1] * -l->norm[1]; } void line_line_intersect(struct line l1, struct line l2, struct point* p) { -- cgit v1.2.3