


'''simple docstring'''






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

__A   :    List[str]											= 6_3_7_8_1_3_7.0
__A   :    Union[str, Any]											= 6_3_5_6_7_5_2.3_1_4_2_4_5
__A   :    List[str]											= 637_8137







def 							UpperCamelCase_     (       A__   :  float				,       A__   :  float				,       A__   :  float				,       A__   :  float   ):
  '''simple docstring'''





  lowerCAmelCase_     : Tuple     =  (AXIS_A - AXIS_B) / AXIS_A
  lowerCAmelCase_     : Optional[Any]     =  atan((1 - flattening) * tan(radians(A__   )   )   )
  lowerCAmelCase_     : Optional[int]     =  atan((1 - flattening) * tan(radians(A__   )   )   )
  lowerCAmelCase_     : Optional[int]     =  radians(A__   )
  lowerCAmelCase_     : int     =  radians(A__   )
  # Equation
  lowerCAmelCase_     : List[Any]     =  sin((phi_a - phi_a) / 2   )
  lowerCAmelCase_     : Optional[Any]     =  sin((lambda_a - lambda_a) / 2   )
  # Square both values
  sin_sq_phi *= sin_sq_phi
  sin_sq_lambda *= sin_sq_lambda
  lowerCAmelCase_     : str     =  sqrt(sin_sq_phi + (cos(A__   ) * cos(A__   ) * sin_sq_lambda)   )
  return 2 * RADIUS * asin(A__   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()







'''simple docstring'''






from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
  from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline



