| line |
true |
false |
branch |
|
22
|
0 |
1 |
if (RETVAL == NULL) croak("Could not allocate state memory"); |
|
40
|
12 |
2 |
while (count < max) { |
|
41
|
11 |
1 |
if (pcg32_random_r(rng) < odds) break; |
|
65
|
0 |
7 |
if (max == min) RETVAL = min; |
|
66
|
0 |
7 |
else if (min > max) croak("max must be greater than min"); |
|
76
|
3 |
20 |
if (x1 == x2 && y1 == y2) XSRETURN_UNDEF; |
|
77
|
0 |
20 |
EXTEND(SP, 2); |
|
80
|
16 |
4 |
if (dx == 0) goto MOVE_Y; |
|
81
|
14 |
2 |
else if (dy == 0) goto MOVE_X; |
|
83
|
8 |
6 |
if (pcg32_random_r(rng) % (magx + abs(dy)) < magx) { |
|
85
|
4 |
6 |
mPUSHs(newSViv(x1 + (dx > 0 ? 1 : -1))); |
|
90
|
4 |
6 |
mPUSHs(newSViv(y1 + (dy > 0 ? 1 : -1))); |
|
99
|
1 |
1 |
if (items > 1) { |
|
100
|
0 |
1 |
if (!SvIOK(ST(1)) && !SvNOK(ST(1))) |
|
102
|
0 |
1 |
factor = SvNV(ST(1)); |
|
119
|
0 |
1 |
if (len == 0) XSRETURN_UNDEF; |
|
134
|
1 |
5 |
if (len == 0) XSRETURN_UNDEF; |
|
137
|
2 |
3 |
if (rnd != len - 1) { |
|
140
|
5 |
2 |
for (i = rnd; i < len - 1; i++) *dst++ = *src++; |
|
156
|
0 |
1 |
if (len == 0) XSRETURN_UNDEF; |
|
166
|
0 |
6 |
if (count == 0) croak("count must be positive"); |
|
167
|
6 |
0 |
if (sides == 0) croak("sides must be positive"); |
|
169
|
18 |
6 |
while (count--) sum += pcg32_random_r(rng) % sides; |
|
184
|
2 |
2 |
if (len == 0 || count == 0) goto DONE; |
|
185
|
1 |
1 |
if (count >= len) { |
|
187
|
5 |
1 |
for (i = 0; i < len; i++) { |
|
194
|
5 |
0 |
for (i = 0; i < len; i++) { |
|
195
|
3 |
2 |
if (pcg32_random_r(rng) < ( count * ( UINT32_MAX / total ) )) { |
|
198
|
2 |
1 |
if (--count == 0) break; |