import math


def fun_theta_beta_m(mach: float, beta:float, gamma=1.4) -> float:
    """

    Calculate theta-beta-mach equation

    Parameters
    ----------
    mach:float
        Mach number
    beta: float
        oblique shock angle
    gamma: float
        isentropic exponent

    Returns
    -------
    theta: float
        tangent of an corner angle
    """
    gp1 = gamma + 1.0

    mult1 = mach * mach * math.sin(beta) * math.sin(beta) - 1.0
    mult2 = 1.0 + (gp1 / 2.0 - math.sin(beta)*math.sin(beta)) * mach*mach

    return mult1 / mult2 / math.tan(beta)