From a097841ed4896a2564f941df90f50fde0d72417f Mon Sep 17 00:00:00 2001 From: Paul Jungeblut Date: Thu, 6 Oct 2016 23:07:28 +0200 Subject: Typesetting for lines. --- geometry/lines.cpp | 11 +++-------- tcr.pdf | Bin 257221 -> 257067 bytes 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/geometry/lines.cpp b/geometry/lines.cpp index ec6fdde..2594ab4 100644 --- a/geometry/lines.cpp +++ b/geometry/lines.cpp @@ -1,11 +1,6 @@ -struct pt { //complex does not work here, becuase we need to set pt.x and pt.y - double x, y; - pt() {}; - pt(double x, double y) : x(x), y(y) {}; -}; - +// Nicht complex benutzen. Eigene struct schreiben. struct line { - double a, b, c; //a*x+b*y+c, b=0 <=> vertical line, b=1 <=> otherwise + double a, b, c; // ax + by + c = 0; vertikale Line: b = 0, sonst: b = 1 }; line pointsToLine(pt p1, pt p2) { @@ -34,4 +29,4 @@ bool areIntersect(line l1, line l2, pt &p) { if (fabs(l1.b) > EPSILON) p.y = -(l1.a * p.x + l1.c); else p.y = -(l2.a * p.x + l2.c); return true; -} \ No newline at end of file +} diff --git a/tcr.pdf b/tcr.pdf index 29fed4b..fc9c8bf 100644 Binary files a/tcr.pdf and b/tcr.pdf differ -- cgit v1.2.3