Advertisement
Guest User

Untitled

a guest
Aug 6th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function math(e, t, r, i, n) {
  2.     var s, a, o, u, c, p, l, m, d, h, y = Math.floor(e / r),
  3.         g = Math.floor(t / i),
  4.         f = e % r,
  5.         b = t % i,
  6.         S = [];
  7.  
  8.     if (s = y - 43 * n % y, s = s % y == 0 ? (y - 4) % y : s, s = 0 == s ? y - 1 : s, a = g - 47 * n % g, a = a % g == 0 ? (g - 4) % g : a, a = 0 == a ? g - 1 : a, f > 0 && b > 0 && (o = s * r, u = a * i, S.push({
  9.         srcX: o,
  10.         srcY: u,
  11.         destX: o,
  12.         destY: u,
  13.         width: f,
  14.         height: b
  15.         })), b > 0)
  16.     for (l = 0; l < y; l++) d = calcXCoordinateXRest_(l, y, n), h = calcYCoordinateXRest_(d, s, a, g, n), c = calcPositionWithRest_(d, s, f, r), p = h * i, o = calcPositionWithRest_(l, s, f, r), u = a * i, S.push({
  17.         srcX: o,
  18.         srcY: u,
  19.         destX: c,
  20.         destY: p,
  21.         width: r,
  22.         height: b
  23.         });
  24.         if (f > 0)
  25.             for (m = 0; m < g; m++) h = calcYCoordinateYRest_(m, g, n), c = (d = calcXCoordinateYRest_(h, s, a, y, n)) * r, p = calcPositionWithRest_(h, a, b, i), o = s * r, u = calcPositionWithRest_(m, a, b, i), S.push({
  26.                 srcX: o,
  27.                 srcY: u,
  28.                 destX: c,
  29.                 destY: p,
  30.                 width: f,
  31.                 height: i
  32.                     });
  33.         for (l = 0; l < y; l++)
  34.             for (m = 0; m < g; m++) h = (m + 37 * n + 41 * (d = (l + 29 * n + 31 * m) % y)) % g, c = d * r + (d >= calcXCoordinateYRest_(h, s, a, y, n) ? f : 0), p = h * i + (h >= calcYCoordinateXRest_(d, s, a, g, n) ? b : 0), o = l * r + (l >= s ? f : 0), u = m * i + (m >= a ? b : 0), S.push({
  35.                 srcX: o,
  36.                 srcY: u,
  37.                 destX: c,
  38.                 destY: p,
  39.                 width: r,
  40.                 height: i
  41.                 });
  42.     return S
  43. }
  44.  
  45. function calcPositionWithRest_(e, t, r, i) {
  46.     return e * i + (e >= t ? r : 0)
  47. }
  48.  
  49. function calcXCoordinateXRest_(e, t, r) {
  50.     return (e + 61 * r) % t
  51. }
  52.  
  53. function calcYCoordinateXRest_(e, t, r, i, n) {
  54.     var s, a, o = n % 2 == 1;
  55.     return (e < t ? o : !o) ? (a = r, s = 0) : (a = i - r, s = r), (e + 53 * n + 59 * r) % a + s
  56. }
  57.  
  58. function calcXCoordinateYRest_(e, t, r, i, n) {
  59.     var s, a, o = n % 2 == 1;
  60.     return (e < r ? o : !o) ? (a = i - t, s = t) : (a = t, s = 0), (e + 67 * n + t + 71) % a + s
  61. }
  62.  
  63. function calcYCoordinateYRest_(e, t, r) {
  64.     return (e + 73 * r) % t
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement