Abgabe fertig

This commit is contained in:
2026-02-11 12:08:46 +01:00
parent 5a293a823a
commit 59ad560f36
38 changed files with 3419 additions and 8763 deletions

View File

@@ -1,24 +1,50 @@
import numpy as np
import winkelumrechnungen as wu
def arccot(x):
def arccot(x: float) -> float:
"""
Berechnung von arccot eines Winkels
:param x: Winkel
:return: arccot(Winkel)
"""
return np.arctan2(1.0, x)
def cot(a):
return np.cos(a) / np.sin(a)
def cot(x: float) -> float:
"""
Berechnung von cot eines Winkels
:param x: Winkel
:return: cot(Winkel)
"""
return np.cos(x) / np.sin(x)
def wrap_mpi_pi(x):
def wrap_mpi_pi(x: float) -> float:
"""
Wrap eines Winkels in den Wertebereich [-π, π)
:param x: Winkel
:return: Winkel in [-π, π)
"""
return (x + np.pi) % (2 * np.pi) - np.pi
def wrap_mhalfpi_halfpi(x):
def wrap_mhalfpi_halfpi(x: float) -> float:
"""
Wrap eines Winkels in den Wertebereich [-π/2, π/2)
:param x: Winkel
:return: Winkel in [-π/2, π/2)
"""
return (x + np.pi / 2) % np.pi - np.pi / 2
def wrap_0_2pi(x):
def wrap_0_2pi(x: float) -> float:
"""
Wrap eines Winkels in den Wertebereich [0, 2π)
:param x: Winkel
:return: Winkel in [0, 2π)
"""
return x % (2 * np.pi)