azimuth function

num azimuth(
  1. num H,
  2. num phi,
  3. num dec
)

Implementation

num azimuth(num H, num phi, num dec) {
  return math.atan2(
      math.sin(H), math.cos(H) * math.sin(phi) - math.tan(dec) * math.cos(phi));
}