Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Mar 29, 2016
1 parent dce3beb commit a1b16a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/genpy/rostime.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ def __mul__(self, val):
def __floordiv__(self, val):
"""
Floor divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` divided by val
:param val: division factor ``int/float``, or :class:`Duration` to divide by
:returns: :class:`Duration` divided by val - a :class:`Duration` if divided by a number, or a number if divided by a duration
"""
t = type(val)
if t in (int, long):
Expand All @@ -406,8 +406,8 @@ def __floordiv__(self, val):
def __div__(self, val):
"""
Divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` divided by val
:param val: division factor ``int/float``, or :class:`Duration` to divide by
:returns: :class:`Duration` divided by val - a :class:`Duration` if divided by a number, or a number if divided by a duration
"""
# unlike __floordiv__, this uses true div for float arg.
# PEP 238
Expand All @@ -424,8 +424,8 @@ def __div__(self, val):
def __truediv__(self, val):
"""
Divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` multiplied by val
:param val: division factor ``int/float``, or :class:`Duration` to divide by
:returns: :class:`Duration` divided by val - a :class:`Duration` if divided by a number, or a number if divided by a duration
"""
if type(val) in (int, long, float):
return Duration.from_sec(self.to_sec() / val)
Expand Down

0 comments on commit a1b16a1

Please sign in to comment.