

"""simple docstring"""




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

A_				:      List[str]           =			6_37_81_37.0
A_				:      Optional[Any]           =			6_35_67_52.31_42_45
A_				:      Tuple           =			6_378_137

def 						A							(  snake_case__		,					snake_case__		,					snake_case__		,					snake_case__     ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__										=   (AXIS_A - AXIS_B) / AXIS_A
			SCREAMING_SNAKE_CASE__										=   atan((1 - flattening) * tan(radians(snake_case__     )     )     )
			SCREAMING_SNAKE_CASE__										=   atan((1 - flattening) * tan(radians(snake_case__     )     )     )
			SCREAMING_SNAKE_CASE__										=   radians(snake_case__     )
			SCREAMING_SNAKE_CASE__										=   radians(snake_case__     )
			# Equation
			SCREAMING_SNAKE_CASE__										=   sin((phi_a - phi_a) / 2     )
			SCREAMING_SNAKE_CASE__										=   sin((lambda_a - lambda_a) / 2     )
			# Square both values
			sin_sq_phi *= sin_sq_phi
			sin_sq_lambda *= sin_sq_lambda
			SCREAMING_SNAKE_CASE__										=   sqrt(sin_sq_phi + (cos(snake_case__     ) * cos(snake_case__     ) * sin_sq_lambda)     )
			return 2 * RADIUS * asin(snake_case__     )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





"""simple docstring"""




from typing import List

from .keymap import KEYMAP, get_character

def 						A							(  snake_case__     ):




			'''simple docstring'''


			def decorator(snake_case__     ):
						SCREAMING_SNAKE_CASE__										=   getattr(snake_case__		,					"""handle_key"""		,					[]     )
						handle += [key]
						setattr(snake_case__		,					"""handle_key"""		,					snake_case__     )
						return func

			return decorator

def 						A							(  *snake_case__     ):




			'''simple docstring'''


			def decorator(snake_case__     ):
						SCREAMING_SNAKE_CASE__										=   getattr(snake_case__		,					"""handle_key"""		,					[]     )
						handle += keys
						setattr(snake_case__		,					"""handle_key"""		,					snake_case__     )
						return func

			return decorator





class  lowerCamelCase    (A__      ):

			def __new__(       cls					:    Dict     ,					__UpperCAmelCase					:    Tuple     ,					__UpperCAmelCase					:    Any     ,					__UpperCAmelCase					:    Optional[Any]							) ->     List[str]:
						SCREAMING_SNAKE_CASE__										=   super().__new__(cls     ,					__UpperCAmelCase     ,					__UpperCAmelCase     ,					__UpperCAmelCase							)
						if not hasattr(__UpperCAmelCase     ,					"""key_handler"""							):
									setattr(__UpperCAmelCase     ,					"""key_handler"""     ,					{}							)
						setattr(__UpperCAmelCase     ,					"""handle_input"""     ,					KeyHandler.handle_input							)

						for value in attrs.values():
									SCREAMING_SNAKE_CASE__										=   getattr(__UpperCAmelCase     ,					"""handle_key"""     ,					[]							)
									for key in handled_keys:
												SCREAMING_SNAKE_CASE__										=   value
						return new_cls





			@staticmethod
			def        SCREAMING_SNAKE_CASE					(       cls					:    Tuple							) ->     Dict:
						SCREAMING_SNAKE_CASE__										=   get_character()
						if char != KEYMAP["undefined"]:
									SCREAMING_SNAKE_CASE__										=   ord(__UpperCAmelCase							)
						SCREAMING_SNAKE_CASE__										=   cls.key_handler.get(__UpperCAmelCase							)
						if handler:
									SCREAMING_SNAKE_CASE__										=   char
									return handler(cls							)
						else:
									return None

def 						A							(  cls     ):




			'''simple docstring'''


			return KeyHandler(cls.__name__		,					cls.__bases__		,					cls.__dict__.copy()     )


