add orthogonal projection
This commit is contained in:
1 parent
6faa0d7456
commit
71733c9099
3 files changed
+22
-2
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import pytest
|
||||
from src.matrixmania.compute import project_ortho
|
||||
|
||||
def test_projection():
|
||||
point = (1.0, 2.0, 3.0)
|
||||
expected = (1.0, 2.0)
|
||||
|
||||
assert project_ortho(point) == expected
|
||||
|
||||
def test_projection_with_scale():
|
||||
point = (1.0, 2.0, 3.0)
|
||||
expected = (100.0, 200.0)
|
||||
|
||||
assert project_ortho(point, 100) == expected
|
||||
Reference in new issue
Block a user