| line |
true |
false |
branch |
|
54
|
20147 |
10304 |
return a < b ? a : b; |
|
58
|
20195 |
10256 |
return a > b ? a : b; |
|
83
|
289 |
144 |
while (*hex) { |
|
85
|
289 |
0 |
if (byte >= '0' && byte <= '9') byte = byte - '0'; |
|
|
72 |
217 |
if (byte >= '0' && byte <= '9') byte = byte - '0'; |
|
86
|
217 |
0 |
else if (byte >= 'a' && byte <= 'f') byte = byte - 'a' + 10; |
|
|
216 |
1 |
else if (byte >= 'a' && byte <= 'f') byte = byte - 'a' + 10; |
|
87
|
1 |
0 |
else if (byte >= 'A' && byte <= 'F') byte = byte - 'A' + 10; |
|
|
0 |
1 |
else if (byte >= 'A' && byte <= 'F') byte = byte - 'A' + 10; |
|
100
|
49 |
0 |
if (hex[0] == '#') hex++; |
|
103
|
2 |
47 |
if (l == 3) { |
|
109
|
47 |
0 |
} else if (l == 6) { |
|
133
|
219289 |
10021 |
for (i = 0; i < len; i++) { |
|
134
|
139140 |
80149 |
if ((str[i] >= '0' && str[i] <= '9') || str[i] == '.') { |
|
|
40094 |
99046 |
if ((str[i] >= '0' && str[i] <= '9') || str[i] == '.') { |
|
|
0 |
120243 |
if ((str[i] >= '0' && str[i] <= '9') || str[i] == '.') { |
|
135
|
99046 |
0 |
if (ti < 31) temp[ti++] = str[i]; |
|
136
|
40070 |
80173 |
} else if (ti > 0) { |
|
138
|
40070 |
0 |
if (count < max_out) { |
|
145
|
0 |
10021 |
if (ti > 0 && count < max_out) { |
|
|
0 |
0 |
if (ti > 0 && count < max_out) { |
|
155
|
3426 |
26784 |
h = h < 0 ? h + 1 : h > 1 ? h - 1 : h; |
|
|
3253 |
23531 |
h = h < 0 ? h + 1 : h > 1 ? h - 1 : h; |
|
156
|
5059 |
25151 |
if (h * 6.0 < 1.0) return m1 + (m2 - m1) * h * 6.0; |
|
157
|
10070 |
15081 |
if (h * 2.0 < 1.0) return m2; |
|
158
|
4983 |
10098 |
if (h * 3.0 < 2.0) return m1 + (m2 - m1) * ((2.0 / 3.0) - h) * 6.0; |
|
170
|
69 |
10001 |
if (s > 1 || l > 1) { |
|
|
0 |
69 |
if (s > 1 || l > 1) { |
|
174
|
10020 |
50 |
m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; |
|
196
|
10 |
68 |
if (mx != mn) { |
|
197
|
3 |
7 |
s = l > 0.5 ? (d / (2.0 - mx - mn)) : (d / (mx + mn)); |
|
198
|
4 |
6 |
if (mx == rn) |
|
199
|
1 |
3 |
h = (gn - bn) / d + (gn < bn ? 6 : 0); |
|
200
|
5 |
1 |
else if (mx == gn) |
|
224
|
7 |
1 |
hsv.s = (mx == 0) ? 0 : d / mx; |
|
227
|
6 |
2 |
if (mx != mn) { |
|
228
|
4 |
2 |
if (mx == rn) |
|
229
|
1 |
3 |
h = (gn - bn) / d + (gn < bn ? 6 : 0); |
|
230
|
1 |
1 |
else if (mx == gn) |
|
246
|
2 |
9 |
if (relative) { |
|
260
|
1 |
10 |
if (relative) { |
|
278
|
1 |
13 |
hsl.a -= colouring_clamp(relative ? hsl.a * amount : amount, 1); |
|
285
|
1 |
13 |
hsl.a += colouring_clamp(relative ? hsl.a * amount : amount, 1); |
|
293
|
0 |
1 |
hsl.s += colouring_clamp(relative ? hsl.s * amount : amount, 1); |
|
300
|
0 |
2 |
hsl.s -= colouring_clamp(relative ? hsl.s * amount : amount, 1); |
|
318
|
3 |
0 |
w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; |
|
346
|
22 |
5 |
if (!force_long) { |
|
348
|
21 |
1 |
if (buf[1] == buf[2] && buf[3] == buf[4] && buf[5] == buf[6]) { |
|
|
21 |
0 |
if (buf[1] == buf[2] && buf[3] == buf[4] && buf[5] == buf[6]) { |
|
|
21 |
0 |
if (buf[1] == buf[2] && buf[3] == buf[4] && buf[5] == buf[6]) { |
|
391
|
49 |
10021 |
if (str[0] == '#') { |
|
394
|
17 |
10004 |
} else if (str[0] == 'r' && str[1] == 'g' && str[2] == 'b') { |
|
|
17 |
0 |
} else if (str[0] == 'r' && str[1] == 'g' && str[2] == 'b') { |
|
|
17 |
0 |
} else if (str[0] == 'r' && str[1] == 'g' && str[2] == 'b') { |
|
397
|
1 |
16 |
if (n < 3) return 0; |
|
401
|
11 |
5 |
out->a = n >= 4 ? nums[3] : 1.0; |
|
403
|
10004 |
0 |
} else if (str[0] == 'h' && str[1] == 's' && str[2] == 'l') { |
|
|
10004 |
0 |
} else if (str[0] == 'h' && str[1] == 's' && str[2] == 'l') { |
|
|
10004 |
0 |
} else if (str[0] == 'h' && str[1] == 's' && str[2] == 'l') { |
|
406
|
1 |
10003 |
if (n < 3) return 0; |
|
407
|
10002 |
1 |
*out = colouring_hsl2rgb(nums[0], nums[1], nums[2], |