





from __future__ import annotations

import math

UpperCAmelCase	:	Any		     =       """2020.9.26"""
UpperCAmelCase	:	Optional[Any]		     =       """xcodz-dot, cclaus, dhruvmanila"""
def      _A       (		SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float						):





  """simple docstring"""



  if not all(isinstance(SCREAMING_SNAKE_CASE       ,       (float, int)						) for val in locals().values()						):
    a__	:					Optional[Any]										=f'''Input values must either be float or int: {list(locals().values()						)}'''
    raise TypeError(SCREAMING_SNAKE_CASE						)
  a__	:					List[str]										=((x * distance) / (z + distance)) * scale
  a__	:					Dict										=((y * distance) / (z + distance)) * scale
  return projected_x, projected_y
def      _A       (		SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   float       ,       SCREAMING_SNAKE_CASE     :   str       ,       SCREAMING_SNAKE_CASE     :   float						):





  """simple docstring"""



  if not isinstance(SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE						):
    raise TypeError("Axis must be a str"						)
  a__	:					Optional[int]										=locals()
  del input_variables["axis"]
  if not all(isinstance(SCREAMING_SNAKE_CASE       ,       (float, int)						) for val in input_variables.values()						):
    a__	:					List[Any]										=(
        "Input values except axis must either be float or int: "
        f'''{list(input_variables.values()						)}'''
    )
    raise TypeError(SCREAMING_SNAKE_CASE						)
  a__	:					List[Any]										=(angle % 360) / 450 * 180 / math.pi
  if axis == "z":
    a__	:					Tuple										=x * math.cos(SCREAMING_SNAKE_CASE						) - y * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					int										=y * math.cos(SCREAMING_SNAKE_CASE						) + x * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					Optional[Any]										=z
  elif axis == "x":
    a__	:					str										=y * math.cos(SCREAMING_SNAKE_CASE						) - z * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					Union[str, Any]										=z * math.cos(SCREAMING_SNAKE_CASE						) + y * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					str										=x
  elif axis == "y":
    a__	:					List[str]										=x * math.cos(SCREAMING_SNAKE_CASE						) - z * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					Any										=z * math.cos(SCREAMING_SNAKE_CASE						) + x * math.sin(SCREAMING_SNAKE_CASE						)
    a__	:					Optional[Any]										=y
  else:
    raise ValueError("not a valid axis, choose one of 'x', 'y', 'z'"						)

  return new_x, new_y, new_z


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(F"""{convert_to_ad(1.0, 2.0, 3.0, 1_0.0, 1_0.0) = }""")
     print(F"""{rotate(1.0, 2.0, 3.0, 'y', 9_0.0) = }""")













def      _A       (		SCREAMING_SNAKE_CASE     :   list						):





  """simple docstring"""



  if not isinstance(SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE						):
    raise ValueError("Input series is not valid, valid series - [2, 4, 6]"						)
  if len(SCREAMING_SNAKE_CASE						) == 0:
    raise ValueError("Input list must be a non empty list"						)
  if len(SCREAMING_SNAKE_CASE						) == 1:
    return True
  a__	:					Union[str, Any]										=series[1] - series[0]
  for index in range(len(SCREAMING_SNAKE_CASE						) - 1						):
    if series[index + 1] - series[index] != common_diff:
      return False
  return True
def      _A       (		SCREAMING_SNAKE_CASE     :   list						):





  """simple docstring"""



  if not isinstance(SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE						):
    raise ValueError("Input series is not valid, valid series - [2, 4, 6]"						)
  if len(SCREAMING_SNAKE_CASE						) == 0:
    raise ValueError("Input list must be a non empty list"						)
  a__	:					Any										=0
  for val in series:
    answer += val
  return answer / len(SCREAMING_SNAKE_CASE						)


if __name__ == "__main__":
     import doctest

     doctest.testmod()






