From 976d708567c8b6f304dc15fbc0a8074b4294bd9d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 24 Jan 2024 17:07:16 -0800
Subject: [PATCH] Fixed build warning, converting float to double accidentally
(cherry picked from commit 048516b5075a2b10dd49f0bb1d4aa3d029111a24)
(cherry picked from commit edc4c8264848fa0f8749edc969e759242170fa85)
---
src/nanosvgrast.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h
index 557037bd..b0368e75 100644
--- a/src/nanosvgrast.h
+++ b/src/nanosvgrast.h
@@ -333,7 +333,7 @@ static float nsvg__normalize(float *x, float* y)
}
static float nsvg__absf(float x) { return x < 0 ? -x : x; }
-static float nsvg__roundf(float x) { return (x >= 0) ? floorf(x + 0.5) : ceilf(x - 0.5); }
+static float nsvg__roundf(float x) { return (x >= 0) ? floorf(x + 0.5f) : ceilf(x - 0.5f); }
static void nsvg__flattenCubicBez(NSVGrasterizer* r,
float x1, float y1, float x2, float y2,