add project_ortho
This commit is contained in:
parent
3a027799d1
commit
130e6c36f4
@ -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
1
tests/test_projection.py
Normal file
@ -0,0 +1 @@
|
||||
from matrixmania import project_ortho
|
||||
Loading…
x
Reference in New Issue
Block a user