I think it looks something like this:
if (0 < sin($dec) - sin($el) * sin($lat)) {
if(sin($az) < 0)
$az = $az + $twopi;
}
else {
$az = $pi - $az;
}
For lines 3-4 only:
if ($cosAzPos && $sinAzNeg) {
$az = $az + $twopi;
}
elseif (!$cosAzPos) {
$az = $pi - $az;
}
else {
}
according to commet, I found in the link. But I'm not sure about access to indexes in float
source
share