Version 2
mit Ruff überarbeitet
This commit is contained in:
1 parent
74bb1cf469
commit
b2a5866b91
1 file changed
+4
-3
@@ -1,4 +1,4 @@
|
|||||||
"""Rechen-Hilfen für Matrizen.
|
""" Rechenhilfen für Matrizen.
|
||||||
|
|
||||||
Dieses Modul stellt vier Funktionen bereit:
|
Dieses Modul stellt vier Funktionen bereit:
|
||||||
|
|
||||||
@@ -25,10 +25,11 @@ Für dieses Rechenmodul werden keine externen Abhängigkeiten benötigt.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
from tabulate import tabulate
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
__all__ = ["matmul", "transpose", "rotate", "rot_2D"]
|
__all__ = ["matmul", "rot_2D", "rotate", "transpose"]
|
||||||
|
|
||||||
|
|
||||||
def _validate(matrix: list[list[float]], name: str) -> tuple[int, int]:
|
def _validate(matrix: list[list[float]], name: str) -> tuple[int, int]:
|
||||||
@@ -231,5 +232,5 @@ if __name__ == "__main__":
|
|||||||
rotation = rot_2D(math.pi / 2)
|
rotation = rot_2D(math.pi / 2)
|
||||||
point = [[1.0], [0.0]]
|
point = [[1.0], [0.0]]
|
||||||
print("rot_2D-Ergebnis:", matmul(rotation, point))
|
print("rot_2D-Ergebnis:", matmul(rotation, point))
|
||||||
|
print(tabulate(rot_2D(1.0)))
|
||||||
# Git - Test
|
# Git - Test
|
||||||
Reference in new issue
Block a user