]> O.S.I.I.S - jp/vkvg.git/commitdiff
debug _normalizeAngle
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 15 Nov 2021 15:09:19 +0000 (16:09 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 15 Nov 2021 15:09:19 +0000 (16:09 +0100)
src/vkvg_context_internal.c

index c005f7b39f28a6c9bcf4e4ea06bf2efc15715409..e182a24dc68ef171bb689c70f04a214fa3ce549d 100644 (file)
@@ -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;