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;