@@ -106,18 +106,15 @@ def _():
106106
107107_functions_1_4 = {
108108 # unary math functions
109- 'acos' : 'Computes the cosine inverse of the given value; the returned angle is in the range' +
110- '0.0 through pi.' ,
111- 'asin' : 'Computes the sine inverse of the given value; the returned angle is in the range' +
112- '-pi/2 through pi/2.' ,
113- 'atan' : 'Computes the tangent inverse of the given value; the returned angle is in the range' +
114- '-pi/2 through pi/2' ,
109+ 'acos' : ':return: inverse cosine of `col`, as if computed by `java.lang.Math.acos()`' ,
110+ 'asin' : ':return: inverse sine of `col`, as if computed by `java.lang.Math.asin()`' ,
111+ 'atan' : ':return: inverse tangent of `col`, as if computed by `java.lang.Math.atan()`' ,
115112 'cbrt' : 'Computes the cube-root of the given value.' ,
116113 'ceil' : 'Computes the ceiling of the given value.' ,
117- 'cos' : """Computes the cosine of the given value.
118-
119- :param col: :class:`DoubleType` column, units in radians.""" ,
120- 'cosh' : 'Computes the hyperbolic cosine of the given value.' ,
114+ 'cos' : """:param col: angle in radians
115+ :return: cosine of the angle, as if computed by `java.lang.Math.cos()`.""" ,
116+ 'cosh' : """ :param col: hyperbolic angle
117+ :return: hyperbolic cosine of the angle, as if computed by `java.lang.Math.cosh()`""" ,
121118 'exp' : 'Computes the exponential of the given value.' ,
122119 'expm1' : 'Computes the exponential of the given value minus one.' ,
123120 'floor' : 'Computes the floor of the given value.' ,
@@ -127,14 +124,16 @@ def _():
127124 'rint' : 'Returns the double value that is closest in value to the argument and' +
128125 ' is equal to a mathematical integer.' ,
129126 'signum' : 'Computes the signum of the given value.' ,
130- 'sin' : """Computes the sine of the given value.
131-
132- :param col: :class:`DoubleType` column, units in radians.""" ,
133- 'sinh' : 'Computes the hyperbolic sine of the given value.' ,
134- 'tan' : """Computes the tangent of the given value.
135-
136- :param col: :class:`DoubleType` column, units in radians.""" ,
137- 'tanh' : 'Computes the hyperbolic tangent of the given value.' ,
127+ 'sin' : """:param col: angle in radians
128+ :return: sine of the angle, as if computed by `java.lang.Math.sin()`""" ,
129+ 'sinh' : """:param col: hyperbolic angle
130+ :return: hyperbolic sine of the given value,
131+ as if computed by `java.lang.Math.sinh()`""" ,
132+ 'tan' : """:param col: angle in radians
133+ :return: tangent of the given value, as if computed by `java.lang.Math.tan()`""" ,
134+ 'tanh' : """:param col: hyperbolic angle
135+ :return: hyperbolic tangent of the given value,
136+ as if computed by `java.lang.Math.tanh()`""" ,
138137 'toDegrees' : '.. note:: Deprecated in 2.1, use :func:`degrees` instead.' ,
139138 'toRadians' : '.. note:: Deprecated in 2.1, use :func:`radians` instead.' ,
140139 'bitwiseNOT' : 'Computes bitwise not.' ,
@@ -173,16 +172,31 @@ def _():
173172
174173_functions_2_1 = {
175174 # unary math functions
176- 'degrees' : 'Converts an angle measured in radians to an approximately equivalent angle ' +
177- 'measured in degrees.' ,
178- 'radians' : 'Converts an angle measured in degrees to an approximately equivalent angle ' +
179- 'measured in radians.' ,
175+ 'degrees' : """
176+ Converts an angle measured in radians to an approximately equivalent angle
177+ measured in degrees.
178+ :param col: angle in radians
179+ :return: angle in degrees, as if computed by `java.lang.Math.toDegrees()`
180+ """ ,
181+ 'radians' : """
182+ Converts an angle measured in degrees to an approximately equivalent angle
183+ measured in radians.
184+ :param col: angle in degrees
185+ :return: angle in radians, as if computed by `java.lang.Math.toRadians()`
186+ """ ,
180187}
181188
182189# math functions that take two arguments as input
183190_binary_mathfunctions = {
184- 'atan2' : 'Returns the angle theta from the conversion of rectangular coordinates (x, y) to' +
185- 'polar coordinates (r, theta). Units in radians.' ,
191+ 'atan2' : """
192+ :param col1: coordinate on y-axis
193+ :param col2: coordinate on x-axis
194+ :return: the `theta` component of the point
195+ (`r`, `theta`)
196+ in polar coordinates that corresponds to the point
197+ (`x`, `y`) in Cartesian coordinates,
198+ as if computed by `java.lang.Math.atan2()`
199+ """ ,
186200 'hypot' : 'Computes ``sqrt(a^2 + b^2)`` without intermediate overflow or underflow.' ,
187201 'pow' : 'Returns the value of the first argument raised to the power of the second argument.' ,
188202}
0 commit comments