170 |
|
return -1; |
171 |
|
if ((v[2] < 0) | (v[2] > 1.)) |
172 |
|
return -1; |
173 |
< |
pol = 180.0/M_PI*acos(v[2]); |
173 |
> |
pol = 180.0/M_PI*Acos(v[2]); |
174 |
|
azi = 180.0/M_PI*atan2(v[1], v[0]); |
175 |
|
if (azi < 0.0) azi += 360.0; |
176 |
|
for (li = 1; ab->lat[li].tmin <= pol; li++) |
602 |
|
/* separate diffuse components */ |
603 |
|
extract_diffuse(&sd->rLambFront, sd->rf); |
604 |
|
extract_diffuse(&sd->rLambBack, sd->rb); |
605 |
< |
extract_diffuse(&sd->tLamb, (sd->tf != NULL) ? sd->tf : sd->tb); |
605 |
> |
if (sd->tf != NULL) |
606 |
> |
extract_diffuse(&sd->tLamb, sd->tf); |
607 |
> |
if (sd->tb != NULL) |
608 |
> |
extract_diffuse(&sd->tLamb, sd->tb); |
609 |
|
/* return success */ |
610 |
|
return SDEnone; |
611 |
|
} |