Skip to content

Commit 577331f

Browse files
committed
fix up wrap_mpi_pi, doco
1 parent 586b4b0 commit 577331f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

spatialmath/base/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"getunit",
184184
"isnumberlist",
185185
"isvectorlist",
186+
186187
# spatialmath.base.quaternions
187188
"pure",
188189
"qnorm",
@@ -206,6 +207,7 @@
206207
"dotb",
207208
"angle",
208209
"qprint",
210+
209211
# spatialmath.base.transforms2d
210212
"rot2",
211213
"trot2",
@@ -222,6 +224,7 @@
222224
"xyt2tr",
223225
"tr2xyt",
224226
"trinv2",
227+
225228
# spatialmath.base.transforms3d
226229
"rotx",
227230
"roty",
@@ -282,6 +285,7 @@
282285
"e2h",
283286
"homtrans",
284287
"rodrigues",
288+
285289
# spatialmath.base.vectors
286290
"colvec",
287291
"unitvec",
@@ -301,9 +305,11 @@
301305
"iszero",
302306
"wrap_0_2pi",
303307
"wrap_mpi_pi",
308+
"wrap_0_pi",
304309
# spatialmath.base.animate
305310
"Animate",
306311
"Animate2",
312+
307313
# spatial.base.graphics
308314
"plotvol2",
309315
"plotvol3",

spatialmath/base/vectors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def unittwist2_norm(S):
501501

502502
def wrap_0_pi(theta):
503503
r"""
504-
Wrap angle to range [0, pi]
504+
Wrap angle to range :math:`[0, \pi]`
505505
506506
:param theta: input angle
507507
:type theta: scalar or ndarray
@@ -513,7 +513,7 @@ def wrap_0_pi(theta):
513513
"""
514514
n = (theta / np.pi)
515515
if isinstance(n, np.ndarray):
516-
n = astype(int)
516+
n = n.astype(int)
517517
else:
518518
n = int(n)
519519

@@ -522,7 +522,7 @@ def wrap_0_pi(theta):
522522

523523
def wrap_0_2pi(theta):
524524
r"""
525-
Wrap angle to range [0, 2pi)
525+
Wrap angle to range :math:`[0, 2\pi)`
526526
527527
:param theta: input angle
528528
:type theta: scalar or ndarray
@@ -533,7 +533,7 @@ def wrap_0_2pi(theta):
533533

534534
def wrap_mpi_pi(angle):
535535
r"""
536-
Wrap angle to range [-pi, pi)
536+
Wrap angle to range :math:`[\-pi, \pi)`
537537
538538
:param theta: input angle
539539
:type theta: scalar or ndarray

0 commit comments

Comments
 (0)