lots more refactoring
This commit is contained in:
parent
941d3e01df
commit
bc218a416b
1 changed files with 1433 additions and 1694 deletions
|
|
@ -61,11 +61,3 @@ ROT2_270 = numpy.array(((0, 1), (-1, 0)), dtype=numpy.int32)
|
|||
def rotation_matrix2(rotation_deg: int) -> NDArray[numpy.int32]:
|
||||
quadrant = (_normalize_angle(rotation_deg) // 90) % 4
|
||||
return (ROT2_0, ROT2_90, ROT2_180, ROT2_270)[quadrant]
|
||||
|
||||
|
||||
def rotation_matrix3(rotation_deg: int) -> NDArray[numpy.int32]:
|
||||
rot2 = rotation_matrix2(rotation_deg)
|
||||
rot3 = numpy.zeros((3, 3), dtype=numpy.int32)
|
||||
rot3[:2, :2] = rot2
|
||||
rot3[2, 2] = 1
|
||||
return rot3
|
||||
|
|
|
|||
Loading…
Reference in a new issue