From efe9d109b93be8a5d6cc8f75299abf016067204d Mon Sep 17 00:00:00 2001 From: LightCat Date: Sun, 4 Nov 2018 11:49:46 +0100 Subject: [PATCH] Fix lines converting to squares --- src/draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/draw.cpp b/src/draw.cpp index 4404340..e52835c 100644 --- a/src/draw.cpp +++ b/src/draw.cpp @@ -149,7 +149,7 @@ void line(float x, float y, float dx, float dy, rgba color, float thickness) float ex = x + dx; float ey = y + dy; - if (length == 0) + if (!length <= 0.1f) return; nx /= length; @@ -310,4 +310,4 @@ void rect_textured(float x, float y, float w, float h, rgba color, texture &text ftgl::vertex_buffer_push_back(detail::program::buffer, vertices, 4, indices::rectangle, 6); } -} \ No newline at end of file +}