~ubuntu-branches/ubuntu/trusty/xscreensaver/trusty

« back to all changes in this revision

Viewing changes to hacks/goop.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-11-30 13:33:13 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091130133313-3b5nz2e7hvbb8h3l
Tags: 5.10-3ubuntu1
* Merge with Debian unstable, remaining changes: (LP: #489062)
  - debian/control: add Build-Depends on ubuntu-artwork
  - debian/rules: use /usr/share/backgrounds
  - debian/control: Move xli | xloadimage recommends to suggests
  - debian/split-hacks.config: Use different set of default hacks to Debian
  - debian/source_xscreensaver.py: Add apport hook
  - debian/patches/53_XScreenSaver.ad.in.patch: Use Ubuntu branding

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#define SCALE       10000  /* fixed-point math, for sub-pixel motion */
48
48
#define DEF_COUNT   12     /* When planes and count are 0, how many blobs. */
49
49
 
50
 
 
51
50
#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
52
51
#define RANDSIGN() ((random() & 1) ? 1 : -1)
53
52
 
126
125
  b->spline = make_spline (b->npoints);
127
126
  b->r = (long *) malloc (sizeof(*b->r) * b->npoints);
128
127
  for (i = 0; i < b->npoints; i++)
129
 
    b->r[i] = ((random() % mid) + (mid/2)) * RANDSIGN();
 
128
    b->r[i] = (long) ((random() % mid) + (mid/2)) * RANDSIGN();
130
129
  return b;
131
130
}
132
131