box-drawing: thickness(): tag as CONST, convert point-size to a float

This commit is contained in:
Daniel Eklöf 2020-12-27 16:14:37 +01:00
parent 973a57a096
commit 8b1e702827
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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