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 +}