From 8b1e702827a0e710c7eaa52865c2ff680b8e6f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 27 Dec 2020 16:14:37 +0100 Subject: [PATCH] box-drawing: thickness(): tag as CONST, convert point-size to a float --- box-drawing.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/box-drawing.c b/box-drawing.c index dda9ea3c..e37cfbee 100644 --- a/box-drawing.c +++ b/box-drawing.c @@ -6,14 +6,15 @@ #define LOG_MODULE "box-drawing" #define LOG_ENABLE_DBG 1 #include "log.h" +#include "macros.h" #include "stride.h" #include "terminal.h" #include "xmalloc.h" -static int -thickness(int pts, int dpi) +static int CONST +thickness(float pts, int dpi) { - return pts * dpi / 72; + return pts * (float)dpi / 72.0; } static void