 |
 |
 |
 |
 |
 |
 |
>>> import math
|
|
|
>>> def pol2cart(angle, radius):
|
|
|
... ```Convert polar to
cartesian```
|
|
... x =
radius*math.cos(angle)
|
|
|
... y =
radius*math.sin(angle)
|
|
|
... return x, y
|
|
|
...
|
|
|
>>> print pol2cart.__doc__
|
|
|
Convert polar to cartesian
|
|
|
>>> x, y = pol2cart(math.pi/3, 3)
|
|