1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
define a(i, j) { scale = 0 if(i % 2 == 0) return i; if(j - i >= 0.5) return i + 1; return i - 1; } define x(w, h, n) { scale = 20 f = w / n scale = 0 i = h / f scale = 1 j = h / f return a(i, j); } x(720, 576, 600)