~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to raster/r.random.surface/random.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* random.c                                                             */
2
 
 
3
 
#undef TRACE
4
 
#undef DEBUG
5
 
 
6
2
#undef MAIN
7
3
#include <grass/gis.h>
8
4
#include "ransurf.h"
9
5
 
10
 
 
11
6
#define M1 259200
12
7
#define IA1 7141
13
8
#define IC1 54773
20
15
#define IA3 4561
21
16
#define IC3 51349
22
17
 
23
 
 
24
18
/* ran1() returns a double with a value between 0.0 and 1.0             */
25
19
double ran1(void)
26
20
{
30
24
    static int iff = 0;
31
25
    int j;
32
26
 
33
 
    FUNCTION(ran1);
 
27
    G_debug(2, "ran1()");
34
28
 
35
29
    if (Seed < 0 || iff == 0) {
36
30
        iff = 1;
61
55
    return temp;
62
56
}
63
57
 
64
 
#undef M1
65
 
#undef IA1
66
 
#undef IC1
67
 
#undef RM1
68
 
#undef M2
69
 
#undef IA2
70
 
#undef IC2
71
 
#undef RM2
72
 
#undef M3
73
 
#undef IA3
74
 
#undef IC3