From 7265c4bf022bb834fe43952f0b55048c59b501a3 Mon Sep 17 00:00:00 2001 From: taliafuller Date: Tue, 20 Oct 2026 18:45:09 +0200 Subject: [PATCH] erster_Stand_compute.py stand_1_pyproject.toml --- compute.py | 10 ++++++++-- pyproject.toml | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/compute.py b/compute.py index 3efe819..5e10c9f 100644 --- a/compute.py +++ b/compute.py @@ -14,6 +14,7 @@ is raised. import math from typing import List, Iterable +from tabulate import tabulate def _is_rectangular(matrix: Iterable[Iterable]) -> bool: @@ -135,9 +136,14 @@ if __name__ == "__main__": print(trsp) print("\nrot_2D:") - # Punkt (1, 0) um 90 Grad (pi / 2) drehen x_neu, y_neu = rot_2D(1.0, 0.0, math.pi / 2) - print(f"Gedrehter Punkt: x = {x_neu:.2f}, y = {y_neu:.2f}") + # optional wegen -e + if abs(x_neu) < 1e-15: + x_neu = 0.0 + if abs(y_neu) < 1e-15: + y_neu = 0.0 + punkt_tabelle = [[x_neu, y_neu]] + print(tabulate(punkt_tabelle)) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3a776b1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[project] +name = "matrixmania" +version = "0.1.0" +dependencies = ["tabulate", "ruff"] \ No newline at end of file