




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

from .haversine_distance import haversine_distance

__lowerCamelCase   :						Optional[int]				=			6_378_137.0
__lowerCamelCase   :						Optional[int]				=			6_356_752.314_245
__lowerCamelCase   :						Dict				=			6_37_81_37







def 		lowercase__   (		__A:	float							,__A:	float							,__A:	float							,__A:	float				):





					'''simple docstring'''






					__magic_name__							:	Dict    							=							(AXIS_A - AXIS_B) / AXIS_A
					# Parametric latitudes
					# https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
					__magic_name__							:	str    							=							atan((1 - flattening) * tan(radians(__A				)				)				)
					__magic_name__							:	Union[str, Any]    							=							atan((1 - flattening) * tan(radians(__A				)				)				)

					# Compute central angle between two points
					# using haversine theta. sigma =  haversine_distance / equatorial radius
					__magic_name__							:	List[Any]    							=							haversine_distance(__A							,__A							,__A							,__A				) / EQUATORIAL_RADIUS

					# Intermediate P and Q values
					__magic_name__							:	Dict    							=							(b_lata + b_lata) / 2
					__magic_name__							:	int    							=							(b_lata - b_lata) / 2

					# Intermediate X value
					# X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
					__magic_name__							:	Optional[int]    							=							(sin(__A				) ** 2) * (cos(__A				) ** 2)
					__magic_name__							:	int    							=							cos(sigma / 2				) ** 2
					__magic_name__							:	str    							=							(sigma - sin(__A				)) * (x_numerator / x_demonimator)

					# Intermediate Y value
					# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
					__magic_name__							:	Union[str, Any]    							=							(cos(__A				) ** 2) * (sin(__A				) ** 2)
					__magic_name__							:	Optional[Any]    							=							sin(sigma / 2				) ** 2
					__magic_name__							:	str    							=							(sigma + sin(__A				)) * (y_numerator / y_denominator)

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


if __name__ == "__main__":
	import doctest

	doctest.testmod()









# NOTE: This file is deprecated and will be removed in a future version.
# It only exists so that temporarely `from diffusers.pipelines import DiffusionPipeline` works

from ...utils import deprecate
from ..controlnet.pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline  # noqa: F401


deprecate(
    '''stable diffusion controlnet''',
    '''0.22.0''',
    '''Importing `FlaxStableDiffusionControlNetPipeline` from diffusers.pipelines.stable_diffusion.flax_pipeline_stable_diffusion_controlnet is deprecated. Please import `from diffusers import FlaxStableDiffusionControlNetPipeline` instead.''',
    standard_warn=False,
    stacklevel=3,
)



