diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-11-15 16:09:19 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-11-15 16:09:19 +0100 |
| commit | 4ddd8e413a9e32cd59cef6983e4c430cacbadc4a (patch) | |
| tree | 0da478d854bc85f69100f001ea4e94000e1aebf5 /src | |
| parent | da4929693bcadf50f7661a5e5f6141d130a8002f (diff) | |
debug _normalizeAngle
Diffstat (limited to 'src')
| -rw-r--r-- | src/vkvg_context_internal.c | 7 |
1 files 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; |