From 4ddd8e413a9e32cd59cef6983e4c430cacbadc4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 15 Nov 2021 16:09:19 +0100 Subject: [PATCH] debug _normalizeAngle --- src/vkvg_context_internal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index c005f7b..e182a24 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -217,11 +217,10 @@ void _add_point (VkvgContext ctx, float x, float y){ } float _normalizeAngle(float a) { - float res = ROUND_DOWN(fmodf(a,2.0f*M_PIF),100); + float res = ROUND_DOWN(fmodf(a, 2.0f * M_PIF), 100); if (res < 0.0f) - return res + 2.0f*M_PIF; - else - return res; + res += 2.0f * M_PIF; + return res; } float _get_arc_step (VkvgContext ctx, float radius) { float dx = 1, dy = 1; -- 2.47.3