From 23111172d8e048ad7af660739192385f5605bfda Mon Sep 17 00:00:00 2001 From: Roman Pytkov Date: Wed, 25 Feb 2026 01:22:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/render/cpu/line.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/cpu/line.zig b/src/render/cpu/line.zig index ce8d528..05a5f59 100644 --- a/src/render/cpu/line.zig +++ b/src/render/cpu/line.zig @@ -28,8 +28,8 @@ pub fn drawLine(ctx: *DrawContext, x0: f32, y0: f32, x1: f32, y1: f32, color: Co /// Брезенхем в координатах буфера; пиксели вне [0, buf_width) x [0, buf_height) пропускаются. fn drawLineInBuffer(ctx: *DrawContext, bx0: i32, by0: i32, bx1: i32, by1: i32, color: Color.PMA, thickness: f32) void { - const bw: i32 = @intCast(ctx.buf_width); - const bh: i32 = @intCast(ctx.buf_height); + const bw = ctx.buf_width; + const bh = ctx.buf_height; const dx: i32 = @intCast(@abs(bx1 - bx0)); const dy: i32 = -@as(i32, @intCast(@abs(by1 - by0))); const sx: i32 = if (bx0 < bx1) 1 else -1;