 Timestamp:
 Feb 21, 2009, 3:26:58 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpipi/trunk/pipi/filter/wave.c
r3397 r3403 59 59 double t = cost * (x  w / 2) + sint * (y  h / 2); 60 60 double step = sin(t * freq + phase); 61 double dx = xamp * step; 62 double dy = yamp * step; 61 double dx = xamp; 62 double dy = yamp; 63 int x2, y2; 63 64 64 int x2 = x + dx; 65 int y2 = y + dy; 65 if(x < 32) dx = dx * x / 32; 66 if(x > w  1  32) dx = dx * (w  1  x) / 32; 67 if(y < 32) dy = dy * y / 32; 68 if(y > h  1  32) dy = dy * (h  1  y) / 32; 66 69 70 x2 = x + dx * step; 71 y2 = y + dy * step; 72 73 /* Just in case... */ 67 74 if(x2 < 0) x2 = 0; 68 75 else if(x2 >= w) x2 = w  1;
Note: See TracChangeset
for help on using the changeset viewer.