Add R90 and R180 constants for rotation shorthand
This commit is contained in:
parent
6567394fbf
commit
6c76e1f5cf
@ -83,6 +83,8 @@ from .builder import (
|
|||||||
from .utils import (
|
from .utils import (
|
||||||
ports2data as ports2data,
|
ports2data as ports2data,
|
||||||
oneshot as oneshot,
|
oneshot as oneshot,
|
||||||
|
R90 as R90,
|
||||||
|
R180 as R180,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ from .transform import (
|
|||||||
normalize_mirror as normalize_mirror,
|
normalize_mirror as normalize_mirror,
|
||||||
rotate_offsets_around as rotate_offsets_around,
|
rotate_offsets_around as rotate_offsets_around,
|
||||||
apply_transforms as apply_transforms,
|
apply_transforms as apply_transforms,
|
||||||
|
R90 as R90,
|
||||||
|
R180 as R180,
|
||||||
)
|
)
|
||||||
from .comparisons import (
|
from .comparisons import (
|
||||||
annotation2key as annotation2key,
|
annotation2key as annotation2key,
|
||||||
|
@ -9,6 +9,11 @@ from numpy.typing import NDArray, ArrayLike
|
|||||||
from numpy import pi
|
from numpy import pi
|
||||||
|
|
||||||
|
|
||||||
|
# Constants for shorthand rotations
|
||||||
|
R90 = pi / 2
|
||||||
|
R180 = pi
|
||||||
|
|
||||||
|
|
||||||
@lru_cache
|
@lru_cache
|
||||||
def rotation_matrix_2d(theta: float) -> NDArray[numpy.float64]:
|
def rotation_matrix_2d(theta: float) -> NDArray[numpy.float64]:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user