~ubuntu-branches/ubuntu/raring/bedtools/raring

« back to all changes in this revision

Viewing changes to src/randomBed/randomBed.cpp

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2012-11-04 17:59:41 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20121104175941-hahqzy1w8uy650z0
Tags: 2.17.0-1
bb9012e Imported Upstream version 2.16.2.
9006b23 Imported Upstream version 2.17.0.
9112569 Documented BEDTools license as a whole.
325689c Removed Pre-Depends: dpkg (>= 1.15.6).
a781b14 Conforms with Policy 3.9.4.
84b1167 Use Debhelper 9. 
0bf572d Distribute the test suite.
422cd34 Bash completion for BEDTools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
            // we need to combine two consective calls to rand()
59
59
            // because RAND_MAX is 2^31 (2147483648), whereas
60
60
            // mammalian genomes are obviously much larger.
61
 
            uint32_t randStart = ((rand() << 31) | rand()) % genomeSize;
 
61
            uint32_t randStart = ((((long) rand()) << 31) | rand()) % genomeSize;
62
62
            // use the above randomStart (e.g., for human 0..3.1billion) 
63
63
            // to identify the chrom and start on that chrom.
64
64
            pair<string, int> location = _genome->projectOnGenome(randStart);