28 lines
594 B
Python
28 lines
594 B
Python
from compute import project_ortho
|
|
|
|
|
|
def test_project_ortho_without_scaling() -> None:
|
|
"""Test orthogonal projection without scaling."""
|
|
# Arrange
|
|
point = (1.0, 2.0, 3.0)
|
|
expected = (1.0, 2.0)
|
|
|
|
# Act
|
|
result = project_ortho(point)
|
|
|
|
# Assert
|
|
assert result == expected
|
|
|
|
|
|
def test_project_ortho_with_scaling() -> None:
|
|
"""Test orthogonal projection with a scale factor of 100."""
|
|
# Arrange
|
|
point = (1.0, 2.0, 3.0)
|
|
scale = 100
|
|
expected = (100.0, 200.0)
|
|
|
|
# Act
|
|
result = project_ortho(point, scale)
|
|
|
|
# Assert
|
|
assert result == expected |