diff options
| author | Federico Angelilli <code@fedang.net> | 2024-03-22 00:01:28 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-03-22 00:01:28 +0100 |
| commit | 12f20dd7cd742e0cf54543ea5a1642b911ed1ec6 (patch) | |
| tree | 17c76736f7d1a86ff2f276526e51a0499439f583 | |
| parent | ba0b6f462ad3024848c63efd6896104472ed4422 (diff) | |
Fix animation grow
| -rw-r--r-- | src/animate.c | 11 |
1 files changed, 1 insertions, 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; |
