





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

__lowercase       =  6_378_137.0
__lowercase       =  6_356_752.314_245
__lowercase       =  6_378_137







def       UpperCAmelCase							(     _lowerCamelCase      :  float			,   _lowerCamelCase      :  float			,   _lowerCamelCase      :  float			,   _lowerCamelCase      :  float     ):





						'''simple docstring'''


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


if __name__ == "__main__":
				import doctest

				doctest.testmod()






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowercase       :str       =  {
    "configuration_upernet": ["UperNetConfig"],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowercase       :Union[str, Any]       =  [
				    "UperNetForSemanticSegmentation",
				    "UperNetPreTrainedModel",
				]


if TYPE_CHECKING:
				from .configuration_upernet import UperNetConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_upernet import UperNetForSemanticSegmentation, UperNetPreTrainedModel


else:
				import sys

				__lowercase       :str       =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)