
"""simple docstring"""


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

from .haversine_distance import haversine_distance

_lowercase							   =				6_378_137.0
_lowercase							   =				6_356_752.314_245
_lowercase							   =				6_37_81_37






def       _snake_case				(		snake_case__   :     float	,      snake_case__   :     float	,      snake_case__   :     float	,      snake_case__   :     float     ):
	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(snake_case__     )     )     )
	A						   =   atan((1 - flattening) * tan(radians(snake_case__     )     )     )

	# Compute central angle between two points
	# using haversine theta. sigma =  haversine_distance / equatorial radius
	A						   =   haversine_distance(snake_case__	,      snake_case__	,      snake_case__	,      snake_case__     ) / 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(snake_case__     ) ** 2) * (cos(snake_case__     ) ** 2)
	A						   =   cos(sigma / 2     ) ** 2
	A						   =   (sigma - sin(snake_case__     )) * (x_numerator / x_demonimator)

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

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()

"""simple docstring"""


# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


_lowercase							   =				subprocess.check_output('''git merge-base main HEAD'''.split()).decode('''utf-8''')
_lowercase							   =				subprocess.check_output(F"""git diff --name-only {fork_point_sha}""".split()).decode('''utf-8''').split()

_lowercase							   =				'''|'''.join(sys.argv[1:])
_lowercase							   =				re.compile(rF"""^({joined_dirs}).*?\.py$""")

_lowercase							   =				[x for x in modified_files if regex.match(x)]
print(''' '''.join(relevant_modified_files), end='''''')