Fix mirror sampling in trunk. Fixes issue 135.

pull/216/head
castano 14 years ago
parent e8dc679874
commit 2c969b70a5

@ -21,10 +21,13 @@ namespace
{
static int mirror(int x, int w)
{
if (w == 1) return 0;
x = abs(x);
while (x >= w) {
x = 2 * w - x - 2;
x = abs(w + w - x - 2);
}
return x;
}
}

Loading…
Cancel
Save