From 12f20dd7cd742e0cf54543ea5a1642b911ed1ec6 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 22 Mar 2024 00:01:28 +0100 Subject: Fix animation grow --- src/animate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/animate.c b/src/animate.c index 2f4be8d..839e748 100644 --- a/src/animate.c +++ b/src/animate.c @@ -21,10 +21,6 @@ double smoothstep(double x, double edge0, double edge1) double quadratic_bezier(double x, double a, double b, double c) { g_assert(x >= 0 && x <= 1); - g_assert(a >= 0 && a <= 1); - g_assert(b >= 0 && b <= 1); - g_assert(c >= 0 && c <= 1); - const double t = 1 - x; return a * t * t + 2 * b * t * x + c * x * x; } @@ -32,11 +28,6 @@ double quadratic_bezier(double x, double a, double b, double c) double cubic_bezier(double x, double a, double b, double c, double d) { g_assert(x >= 0 && x <= 1); - g_assert(a >= 0 && a <= 1); - g_assert(b >= 0 && b <= 1); - g_assert(c >= 0 && c <= 1); - g_assert(d >= 0 && d <= 1); - const double t = 1 - x; return a * (t * t * t) + 3 * b * (t * t * x) + 3 * c * (t * x * x) + d * (x * x * x); } @@ -197,7 +188,7 @@ static bool grow_func(Animation *grow, Layout *layout) int width = start_w + pos * (layout->width - start_w); layout->width = width; - for (GList *it = layout->children, *next = it->next; it; it = next, next = it ? it->next : NULL) { + for (GList *it = layout->children->next, *next = it->next; it; it = next, next = it ? it->next : NULL) { Layout *child = it->data; if (child->x + child->width <= layout->x + width) continue; -- cgit v1.2.3