docs: def sexa2deci(sign, hd, mm, ss, todeg=False):
      """Combine sexagesimal components into a decimal number.
  
      Parameters
      ----------
      sign : int
          Sign of the number: 1 for +ve, -1 for negative.
      hd : float
          The hour or degree like part.
      mm : float
          The minute or arc-minute like part.
      ss : float
          The second or arc-second like part.
      todeg : bool
          If True then convert to degrees, assuming that the input value
          is in hours. Default is False.
  
      Returns
      -------
      d : float
          The decimal equivalent of the sexagesimal number.
  
      Raises
      ------
      ValueError
          This exception is raised if `sign` is not -1 or 1.
  
      Notes
      -----
      The angle returned is::
  
        sign * (hd + mm / 60.0 + ss / 3600.0)
  
      In sexagesimal notation the sign applies to the whole quantity and
      not to each part separately. So the `sign` is asked separately, and
      applied to the whole quantity.
  
      If the sexagesimal quantity is in hours, then we frequently want to
      convert it into degrees. If the `todeg == True` then the given
      value is assumed to be in hours, and the returned value will be in
      degrees.
  
      Examples
      --------
      >>> d = sexa2deci(1,12,0,0.0)
      >>> d
      12.0
      >>> d = sexa2deci(1,12,0,0.0,todeg=True)
      >>> d
      180.0
      >>> x = sexa2deci(1,9,12.456,0.0)
      >>> assert round(x,4) == 9.2076
      >>> x  = sexa2deci(1,11,30,27.0)
      >>> assert round(x, 4) == 11.5075
      """
      divisors = [1.0, 60.0, 3600.0]
      d = 0.0
      # sexages[0] is sign.
      if sign not in (-1, 1):
          raise ValueError("Sign has to be -1 or 1.")
  
      sexages = [sign, hd, mm, ss]
      for i, divis in zip(sexages[1:], divisors):
          d += i / divis
  
      # Add proper sign.
      d *= sexages[0]
  
      if todeg:
          d = h2d(d)
  
      return d