summaryrefslogtreecommitdiff
path: root/FrameRender/P_LineSegment.c
diff options
context:
space:
mode:
Diffstat (limited to 'FrameRender/P_LineSegment.c')
-rw-r--r--FrameRender/P_LineSegment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/FrameRender/P_LineSegment.c b/FrameRender/P_LineSegment.c
index f2236ff..02f7049 100644
--- a/FrameRender/P_LineSegment.c
+++ b/FrameRender/P_LineSegment.c
@@ -26,8 +26,8 @@ void LineSegment_callback(LineSegment* self, struct PixelContext* fc) {
rotatePoint(&y, &x, -phi);
rotatePoint(&bY, &bX, -phi);
- if (0 <= x && x <= bX &&
- -(i32)self->width / 2 <= y && y <= self->width / 2)
+ i32 halfWidth = self->width / 2;
+ if (0 <= x && x <= bX && -halfWidth <= y && y <= halfWidth)
{
ARGB_merge(&fc->pixel, self->color);
}