






from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

__a      :       List[str]				  =   6378137.0
__a      :       int				  =   6356752.314245
__a      :       Tuple				  =   6378137



def 			_SCREAMING_SNAKE_CASE						( __lowercase   :			float			,				__lowercase   :			float			,				__lowercase   :			float			,				__lowercase   :			float    )						->      float:





    """simple docstring"""

    __A         =	(AXIS_A - AXIS_B) / AXIS_A
    # Parametric latitudes
    # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
    __A         =	atan((1 - flattening) * tan(radians(__lowercase    )    )    )
    __A         =	atan((1 - flattening) * tan(radians(__lowercase    )    )    )

    # Compute central angle between two points
    # using haversine theta. sigma =  haversine_distance / equatorial radius
    __A         =	haversine_distance(__lowercase			,				__lowercase			,				__lowercase			,				__lowercase    ) / EQUATORIAL_RADIUS

    # Intermediate P and Q values
    __A         =	(b_lata + b_lata) / 2
    __A         =	(b_lata - b_lata) / 2

    # Intermediate X value
    # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
    __A         =	(sin(__lowercase    ) ** 2) * (cos(__lowercase    ) ** 2)
    __A         =	cos(sigma / 2    ) ** 2
    __A         =	(sigma - sin(__lowercase    )) * (x_numerator / x_demonimator)

    # Intermediate Y value
    # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
    __A         =	(cos(__lowercase    ) ** 2) * (sin(__lowercase    ) ** 2)
    __A         =	sin(sigma / 2    ) ** 2
    __A         =	(sigma + sin(__lowercase    )) * (y_numerator / y_denominator)

    return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
  import doctest

  doctest.testmod()














__a      :       List[Any]				  =   8.3_1_4_4_5_9_8



def 			_SCREAMING_SNAKE_CASE						( __lowercase   :			float			,				__lowercase   :			float    )						->      float:





    """simple docstring"""

    if temperature < 0:
        raise Exception("""Temperature cannot be less than 0 K"""    )
    if molar_mass <= 0:
        raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""    )
    else:
        return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
  import doctest

  # run doctest
  doctest.testmod()

  # example
  __a      :       int				  =   300
  __a      :       int				  =   28
  __a      :       int				  =   rms_speed_of_molecule(temperature, molar_mass)
  print(f"""Vrms of Nitrogen gas at 300 K is {vrms} m/s""")




