polar

Complex.polar(abs[, arg]) â complex
Class Public methods

Returns a complex object which denotes the given polar form.

Complex.polar(3, 0)            #=> (3.0+0.0i)
Complex.polar(3, Math::PI/2)   #=> (1.836909530733566e-16+3.0i)
Complex.polar(3, Math::PI)     #=> (-3.0+3.673819061467132e-16i)
Complex.polar(3, -Math::PI/2)  #=> (1.836909530733566e-16-3.0i)
doc_ruby_on_rails
2015-04-01 12:53:40
Comments
Leave a Comment

Please login to continue.