1176 |
|
static double |
1177 |
|
subtract_min_Y(SDNode *st) |
1178 |
|
{ |
1179 |
< |
float vmin; |
1179 |
> |
const float vmaxmin = 1.5/M_PI; |
1180 |
> |
float vmin; |
1181 |
|
/* be sure to skip unused portion */ |
1182 |
|
if (st->ndim == 3) { |
1183 |
|
int n; |
1184 |
< |
vmin = 1./M_PI; |
1184 |
> |
vmin = vmaxmin; |
1185 |
|
if (st->log2GR < 0) { |
1186 |
|
for (n = 0; n < 8; n += 2) { |
1187 |
|
float v = SDgetTreMin(st->u.t[n]); |
1197 |
|
} else /* anisotropic covers entire tree */ |
1198 |
|
vmin = SDgetTreMin(st); |
1199 |
|
|
1200 |
< |
if (vmin <= .01/M_PI) |
1200 |
> |
if ((vmin >= vmaxmin) | (vmin <= .01/M_PI)) |
1201 |
|
return .0; /* not worth bothering about */ |
1202 |
|
|
1203 |
|
SDsubtractTreVal(st, vmin); |
1319 |
|
SDtraverseTre(stc[tt_Y], NULL, 0, get_min_RGB, &my_min); |
1320 |
|
/* convert to C_COLOR */ |
1321 |
|
ymin = c_fromSharpRGB(my_min.rgb, cs); |
1322 |
< |
if (ymin <= .01/M_PI) /* not worth bothering about? */ |
1323 |
< |
return .0; |
1322 |
> |
if ((ymin >= .5*FHUGE) | (ymin <= .01/M_PI)) |
1323 |
> |
return .0; /* close to zero or no tree */ |
1324 |
|
/* adjust u' & v' trees */ |
1325 |
|
SDtraverseTre(stc[tt_u], NULL, 0, adjust_utree, &my_min); |
1326 |
|
SDtraverseTre(stc[tt_v], NULL, 0, adjust_vtree, &my_min); |