

from __future__ import annotations

import math

UpperCAmelCase__ :     Optional[Any]				    =    """2020.9.26"""
UpperCAmelCase__ :     Any				    =    """xcodz-dot, cclaus, dhruvmanila"""






def 					__lowercase      (     _A						,    _A						,    _A						,    _A						,    _A			)     ->						tuple[float, float]:
      if not all(isinstance(_A						,    (float, int)			) for val in locals().values()			):
            SCREAMING_SNAKE_CASE :      Tuple       =   F"Input values must either be float or int: {list(locals().values()			)}"
            raise TypeError(_A			)
      SCREAMING_SNAKE_CASE :      Any       =   ((x * distance) / (z + distance)) * scale
      SCREAMING_SNAKE_CASE :      Dict       =   ((y * distance) / (z + distance)) * scale
      return projected_x, projected_y






def 					__lowercase      (     _A						,    _A						,    _A						,    _A						,    _A			)     ->						tuple[float, float, float]:
      if not isinstance(_A						,    _A			):
            raise TypeError("""Axis must be a str"""			)
      SCREAMING_SNAKE_CASE :      int       =   locals()
      del input_variables["axis"]
      if not all(isinstance(_A						,    (float, int)			) for val in input_variables.values()			):
            SCREAMING_SNAKE_CASE :      Dict       =   (
                """Input values except axis must either be float or int: """
                F"{list(input_variables.values()			)}"
            )
            raise TypeError(_A			)
      SCREAMING_SNAKE_CASE :      List[Any]       =   (angle % 360) / 450 * 180 / math.pi
      if axis == "z":
            SCREAMING_SNAKE_CASE :      str       =   x * math.cos(_A			) - y * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      str       =   y * math.cos(_A			) + x * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      Tuple       =   z
      elif axis == "x":
            SCREAMING_SNAKE_CASE :      int       =   y * math.cos(_A			) - z * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      List[Any]       =   z * math.cos(_A			) + y * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      Any       =   x
      elif axis == "y":
            SCREAMING_SNAKE_CASE :      List[Any]       =   x * math.cos(_A			) - z * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      Optional[Any]       =   z * math.cos(_A			) + x * math.sin(_A			)
            SCREAMING_SNAKE_CASE :      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, 10.0, 10.0) = }""")
  print(F"""{rotate(1.0, 2.0, 3.0, 'y', 90.0) = }""")







def 					__lowercase      (     _A						,    _A			)     ->						int:
      return int((input_a, input_a).count(1			) != 0			)






def 					__lowercase      (     )     ->						None:
      assert or_gate(0						,    0			) == 0
      assert or_gate(0						,    1			) == 1
      assert or_gate(1						,    0			) == 1
      assert or_gate(1						,    1			) == 1


if __name__ == "__main__":
  print(or_gate(0, 1))
  print(or_gate(1, 0))
  print(or_gate(0, 0))
  print(or_gate(1, 1))




