Skip to content

Commit 73eea94

Browse files
authored
robots/units docs (#140)
* robots/units docs * :class: changed to :obj: for builtins
1 parent 249a21d commit 73eea94

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/compas_fab/robots/units.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Unit conversions on lists, useful for defining joint values."""
12
from __future__ import absolute_import
23
from __future__ import division
34
from __future__ import print_function
@@ -11,32 +12,32 @@
1112

1213

1314
def to_radians(degrees):
14-
"""Converts a list of floats representing degrees to a list of radians.
15+
"""Convert a list of floats representing degrees to a list of radians.
1516
1617
Parameters
1718
----------
18-
degrees : list of :obj:`float`
19-
List of degrees.
19+
degrees : :obj:`list` of :obj:`float`
20+
List of angle values in degrees.
2021
2122
Returns
2223
-------
23-
list of :obj:`float`
24-
List of radians.
24+
:obj:`list` of :obj:`float`
25+
List of angle values in radians.
2526
"""
2627
return [math.radians(d) for d in degrees]
2728

2829

2930
def to_degrees(radians):
30-
"""Converts a list of floats representing radians to a list of degrees.
31+
"""Convert a list of floats representing radians to a list of degrees.
3132
3233
Parameters
3334
----------
34-
radians : list of :obj:`float`
35-
List of radians.
35+
radians : :obj:`list` of :obj:`float`
36+
List of angle values in radians.
3637
3738
Returns
3839
-------
39-
list of :obj:`float`
40+
:obj:`list` of :obj:`float`
4041
List of degress.
4142
"""
4243
return [math.degrees(r) for r in radians]

0 commit comments

Comments
 (0)