+void actlist_verify(actlist_t*a, int32_t y)
+{
+ segment_t*s = a->list;
+ assert(!s || !s->left);
+ double lastx;
+ while(s) {
+ if(y) {
+ double x = ((double)s->delta.x*(y-s->a.y)/s->delta.y)+s->a.x;
+ if(s!=a->list) {
+ assert(lastx<=x);
+ }
+ lastx = x;
+ }
+ assert(!s->left || s->left->right == s);
+ assert(!s->right || s->right->left == s);
+ s = s->right;
+ }
+}