Schüle Daniel wrote:
...
> btw I like how Ruby handles the creation of complex numbers
>
> c = Complex(1,1)
> p = Complex.polar(1,45.0/360*2*PI)
class Complex(complex):
@classmethod
def polar(class_, radius, angle):
return class_(radius * cos(angle), radius * sin(angle))
--Scott David Daniels
scott.daniels at acm.org