Skip to content

Commit 5330f38

Browse files
committed
type hints for trinterp2
1 parent ae662dc commit 5330f38

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎spatialmath/base/transforms2d.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,16 @@ def tr2jac2(T: SE2Array) -> R3x3:
773773
J[:2, :2] = smb.t2r(T)
774774
return J
775775

776+
@overload
777+
def trinterp2(start: Optional[SO2Array], end: SO2Array, s: float) -> SO2Array:
778+
...
776779

777-
def trinterp2(
778-
start: Union[SE2Array, None], end: SE2Array, s: float
779-
) -> Union[SO2Array, SE2Array]:
780+
781+
@overload
782+
def trinterp2(start: Optional[SE2Array], end: SE2Array, s: float) -> SE2Array:
783+
...
784+
785+
def trinterp2(start, end, s):
780786
"""
781787
Interpolate SE(2) or SO(2) matrices
782788

0 commit comments

Comments
 (0)