Aufgabe Orthogonale Projektion
This commit is contained in:
1 parent
3f7c8b1195
commit
262f0c3dab
3 files changed
+53
-2
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"""Unit-Tests für orthogonale Projektionen in compute.py."""
|
||||
|
||||
from matrixmania.compute import project_ortho
|
||||
|
||||
|
||||
def test_project_ortho_default_scale() -> None:
|
||||
"""Testet die orthogonale Projektion mit Standard-Skalierungsfaktor."""
|
||||
# Arrange
|
||||
point = (1.0, 2.0, 3.0)
|
||||
|
||||
# Act
|
||||
result = project_ortho(point)
|
||||
|
||||
# Assert
|
||||
assert result == (1.0, 2.0)
|
||||
|
||||
|
||||
def test_project_ortho_scaled() -> None:
|
||||
"""Testet die orthogonale Projektion mit einem Skalierungsfaktor von 100."""
|
||||
# Arrange
|
||||
point = (1.0, 2.0, 3.0)
|
||||
scale = 100
|
||||
|
||||
# Act
|
||||
result = project_ortho(point, scale=scale)
|
||||
|
||||
# Assert
|
||||
assert result == (100.0, 200.0)
|
||||
Reference in new issue
Block a user