import math


def parallax(
    emission1: float, gndaz1: float, emission2: float, gndaz2: float
) -> float:
    """Returns the parallax angle between the two look vectors described
       by the emission angles and sub-spacecraft ground azimuth angles.

       Input angles are assumed to be radians, as is the return value."""

    def x(emi, gndaz):
        return math.sin(gndaz) * math.sin(emi)

    def y(emi, gndaz):
        return math.cos(gndaz) * math.sin(emi)

    def z(emi):
        return math.cos(emi)

    one_dot_two = (
        (x(emission1, gndaz1) * x(emission2, gndaz2))
        + (y(emission1, gndaz1) * y(emission2, gndaz2))
        + (z(emission1) * z(emission2))
    )
    return math.acos(one_dot_two)