Next / Previous / Contents / Shipman's homepage

3.3. The Polar class

As a convenience for coordinate conversion, this module supports a very simple class to represent polar coordinates. The general form of the constructor takes as arguments a pair of polar coordinates (r, θ):

Polar(r, theta)

Instances of this class implement these methods:

.toCartesian()

Returns the equivalent Cartesian coordinates of self as a Pt instance.

.__str__(self)

Returns a string of the form (r, θ).