From 98613036c1d9b10cdc5098ff05156a9b81846a59 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 7 Jun 2021 21:31:24 +0300 Subject: [PATCH] gg: fix draw_line on m1 --- vlib/gg/gg.v | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 86b6de238d..a7ccfa7f1b 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -9,7 +9,6 @@ import sokol.sapp import sokol.sgl import sokol.gfx import math -import math.mathutil as mu // import time pub type FNCb = fn (x voidptr) @@ -569,8 +568,8 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) { $if !android { if ctx.scale > 1 { // Make the line more clear on hi dpi screens: draw a rectangle - mut width := mu.abs(x2 - x) - mut height := mu.abs(y2 - y) + mut width := (x2 - x) + mut height := (y2 - y) if width == 0 { width = 1 } else if height == 0 {