dx = i*g + g/2 - c->source[k].x;
dy = j*g + g/2 - c->source[k].y;
dist = sqrt(dx*dx + dy*dy); /* what's the performance penalty here? */
- result += (dist > c->radius ? 0 : c->wave_height[dist]);
+ result += (dist >= c->radius ? 0 : c->wave_height[dist]);
}
result %= c->colors;
interference_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
+ struct inter_context *c = (struct inter_context *) closure;
+ c->w = w;
+ c->h = h;
}
static Bool