add project_ortho

This commit is contained in:
marcelbls 2025-11-20 14:20:08 +01:00
parent 3a027799d1
commit 130e6c36f4
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
from typing import List
import math
from tabulate import tabulate
from typing import Tuple
def matmul(matrix_a: List[List[int]], matrix_b: List[List[int]]) -> List[List[int]]:
"""
@ -95,6 +96,8 @@ def rot_3D(angle: float, axis: str) -> List[List[float]]:
else:
raise ValueError("Not a valid axis. Choose from 'x', 'y', 'z'.")
def project_ortho(point: Tuple[float, float, float], scale: float = 1) -> Tuple[float, float]:
return (point[0]*scale, point[1]*scale)
if __name__ == "__main__":

1
tests/test_projection.py Normal file
View File

@ -0,0 +1 @@
from matrixmania import project_ortho