From 38219886106f8ad55d865be85b280a9004163e55 Mon Sep 17 00:00:00 2001 From: Amy Bowersox Date: Tue, 10 Dec 2019 13:53:33 -0700 Subject: [PATCH] I think I reversed a sign somewhere --- src/devctxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devctxt.c b/src/devctxt.c index e858330..2fd12a4 100755 --- a/src/devctxt.c +++ b/src/devctxt.c @@ -69,13 +69,13 @@ static BOOL line_clip(PINT32 output, INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT } else if (outcode1 & 0x2) { - y1 += (y2 - y1) * ((xmax - x1) / (x2 - x1)); + y1 -= (y2 - y1) * ((xmax - x1) / (x2 - x1)); x1 = xmax; Log(LDEBUG, "clipped against right to point (%d, %d)", x1 >> 16, y1 >> 16); } else if (outcode1 & 0x1) { - y1 += (y2 - y1) * ((xmin - x1) / (x2 - x1)); + y1 -= (y2 - y1) * ((xmin - x1) / (x2 - x1)); x1 = xmin; Log(LDEBUG, "clipped against left to point (%d, %d)", x1 >> 16, y1 >> 16); }